Merge branch 'develop' into ent-13085-17271-cifrado-de-contrasena-ldap-en-el-inspector

This commit is contained in:
Daniel Cebrian 2024-04-26 12:36:21 +02:00
commit 0bf3dff509
591 changed files with 21380 additions and 14357 deletions

View File

@ -6,37 +6,43 @@ With more than 50,000 customer installations across the five continents, Pandora
Pandora FMS gives you the agility to find and solve problems quickly, scaling them so they can be derived from any source, on-premise, multi cloud or both of them mixed. Now you have that capability across your entire IT stack and analytics to find any problem, even the ones that are hard to find.
Thanks to more than 500 plugins available, you can control and manage any application and technology, from SAP, Oracle, Lotus, Citrix or Jboss to VMware, AWS, SQL Server, Redhat, Websphere, etc.
### Support
For community support you can visit our forums at https://pandorafms.com/community/ and if you need commercial information or/and professional support visit https://pandorafms.com
For community support you can visit our forums at https://pandorafms.com/community/
Pandora FMS has a "commercial" solution, with different features, oriented to companies that do not want to spend time using open source solutions, but closed packaged products, with periodic updates and professional support. Its name is Pandora FMS Enterprise, and you can find more information about it at https://pandorafms.com.
### How to install Pandora FMS
Installing Pandora FMS is a very easy task. Please visit our wiki and follow all the steps described for a quick and proper installation. https://pandorafms.com/manual/en/documentation/02_installation/01_installing
Installing Pandora FMS from sources is a complex task. Please visit our wiki and follow all the steps described for a proper installation. https://pandorafms.com/manual/
### What is Pandora FMS?
Pandora FMS is a monitoring application to watch systems and applications that allows to know the status of any element of the business systems. Pandora FMS watches your hardware, software, your multilayer system and, of course, your OS. Pandora FMS can detect if a network interface is down or the movement of any NASDAQ new technology market value. If you wish, Pandora FMS can send a SMS message when your system or your application fails or when Google stock value drops below 330 US\$. Pandora FMS will fit your systems and requirements, because it has been designed to be open, modular, multiplattform and easy to customize.
Pandora FMS is an open source monitoring application whose origin dates back to 2004. It integrates in the same application the monitoring of different infrastructure elements: networks, applications, servers, web, and other specific data sources such as logs, WMI, Netflow or SNMP traps.
### Other things Pandora FMS can do
It allows you to supervise systems and applications of all types, through remote monitoring or with software agents installed on the equipment to be monitored.
Pandora FMS is a monitoring tool that not only measures if a parameter is right or wrong. Pandora FMS can quantify the state (right or wrong), or store a value (numeric or alphanumeric) for months if necessary. Pandora FMS can measure performances, compare values among different systems and set alarms over thresholds. Pandora FMS works against a Database so it can generate reports, statistics, SLA and meausre anything: OS, applications and hardware systems, such as firewalls, proxies, Databases, web servers, VPN, routers, switches, processes, services, [remote accesses to servers](https://pandorafms.com/server-monitoring/), etc. Everything integrated in an open and distributed architecture. Pandora FMS can be deployed over any OS, with specific agents for each platform. There are agents for Windows (2000, XP, 2003), GNU/Linux, Solaris, HP-UX, BSD, AIX, IPSO and OpenWRT. Pandora FMS not only gathers information through its agents, but it can also monitor any hardware system with TCP/IP connectivity, such as load balancing systems, routers, switches or printers, through SNMP and TCP/ICMP checks.
Pandora FMS monitors your hardware, software, your multilayer system and, of course, your operating system. Pandora FMS can detect if a network interface is down or the movement of the market value of any new NASDAQ technology. If desired, Pandora FMS can send an SMS message when your system or application fails or when the value of Tesla's stock drops below \$180. Pandora FMS will adapt to your systems and requirements, because it has been designed to be open, modular, multiplatform and easy to customize.
Pandora FMS can be deployed over any OS, with specific agents for each platform. There are agents for Windows (2000, XP, 2003), GNU/Linux, Solaris, HP-UX, BSD, AIX, IPSO and OpenWRT. Pandora FMS not only gathers information through its agents, but it can also monitor any hardware system with TCP/IP connectivity, such as load balancing systems, routers, switches or printers, through SNMP and TCP/ICMP checks.
Pandora FMS is a monitoring tool that not only measures if a parameter is right or wrong. Pandora FMS can quantify the state (right or wrong), or store a value (numeric or alphanumeric) for months if necessary. Pandora FMS can measure performances, compare values among different systems and set alarms over thresholds. Pandora FMS works against a MySQL Database so it can generate reports, statistics, SLA and measure anything.
### Main features
- Network monitoring
- WMI monitoring
- Agent monitoring (for all OS)
- Graphical reporting, based on it's own SQL backend
- Server monitoring (using agents for Windows, Linux, Mac, BSD and legacy Unix)
- SSH/WMI remote monitorin.
- Graphical reporting, based on SQL backend
- SLA, and ITIL KPI metrics on reporting
- Status & Performance monitoring
- GIS tracking and viewing
- Inventory management (Local and remote)
- Netflow support
- Centralized log collection.
- User defined visual console screens and Dashboards WYSIWYG
- Very high capacity (Thousands of devices)
- Multiuser, several levels of ACL management.
- Multitenant, several levels of ACL management.
### Screenshots

Binary file not shown.

View File

@ -304,7 +304,6 @@ server_dependencies=" \
perl(Sys::Syslog) \
perl(DBI) \
perl(XML::Simple) \
perl(Geo::IP) \
perl(IO::Socket::INET6) \
perl(XML::Twig) \
expect \
@ -344,7 +343,6 @@ ipam_dependencies=" \
perl(Sys::Syslog) \
perl(DBI) \
perl(XML::Simple) \
perl(Geo::IP) \
perl(IO::Socket::INET6) \
perl(XML::Twig)"
execute_cmd "yum install -y $ipam_dependencies" "Installing IPAM Instant client"
@ -521,31 +519,15 @@ include (\$ownDir . "config_process.php");
EO_CONFIG_F
cat > /etc/httpd/conf.d/pandora.conf << EO_CONFIG_F
ServerTokens Prod
<Directory "/var/www/html">
Options Indexes FollowSymLinks
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
EO_CONFIG_F
# Add ws proxy options to apache.
cat >> /etc/httpd/conf.modules.d/00-proxy.conf << 'EO_HTTPD_MOD'
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
EO_HTTPD_MOD
cat >> /etc/httpd/conf.d/wstunnel.conf << 'EO_HTTPD_WSTUNNEL'
ProxyRequests Off
<Proxy *>
Require all granted
</Proxy>
ProxyPass /ws ws://127.0.0.1:8080
ProxyPassReverse /ws ws://127.0.0.1:8080
EO_HTTPD_WSTUNNEL
# Temporal quitar htaccess
sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/images/.htaccess
sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/attachment/.htaccess
@ -692,16 +674,6 @@ EO_LRA
chmod 0644 /etc/logrotate.d/pandora_server
chmod 0644 /etc/logrotate.d/pandora_agent
# Add websocket engine start script.
mv /var/www/html/pandora_console/pandora_websocket_engine /etc/init.d/
chmod +x /etc/init.d/pandora_websocket_engine
# Start Websocket engine
/etc/init.d/pandora_websocket_engine start &>> $LOGFILE
# Configure websocket to be started at start.
systemctl enable pandora_websocket_engine &>> $LOGFILE
# Enable pandora ha service
systemctl enable pandora_server --now &>> $LOGFILE
execute_cmd "systemctl start pandora_server" "Starting Pandora FMS Server"

View File

@ -394,8 +394,8 @@ console_dependencies=" \
mod_ssl \
libzstd \
openldap-clients \
https://firefly.pandorafms.com/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \
https://firefly.pandorafms.com/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \
https://firefly.pandorafms.com/centos8/chromium-122.0.6261.128-1.el8.x86_64.rpm \
https://firefly.pandorafms.com/centos8/chromium-common-122.0.6261.128-1.el8.x86_64.rpm \
https://firefly.pandorafms.com/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
https://firefly.pandorafms.com/centos8/pandora_gotty-1.0-1.el8.x86_64.rpm \
https://firefly.pandorafms.com/centos8/pandorafms_made-0.1.0-1.el8.x86_64.rpm \
@ -417,7 +417,6 @@ server_dependencies=" \
perl(Sys::Syslog) \
perl(DBI) \
perl(XML::Simple) \
perl(Geo::IP) \
perl(IO::Socket::INET6) \
perl(XML::Twig) \
expect \
@ -457,7 +456,6 @@ ipam_dependencies=" \
perl(Sys::Syslog) \
perl(DBI) \
perl(XML::Simple) \
perl(Geo::IP) \
perl(IO::Socket::INET6) \
perl(XML::Twig)"
execute_cmd "dnf install -y $ipam_dependencies" "Installing IPAM Instant client"
@ -632,31 +630,15 @@ include (\$ownDir . "config_process.php");
EO_CONFIG_F
cat > /etc/httpd/conf.d/pandora.conf << EO_CONFIG_F
ServerTokens Prod
<Directory "/var/www/html">
Options Indexes FollowSymLinks
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
EO_CONFIG_F
# Add ws proxy options to apache.
cat >> /etc/httpd/conf.modules.d/00-proxy.conf << 'EO_HTTPD_MOD'
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
EO_HTTPD_MOD
cat >> /etc/httpd/conf.d/wstunnel.conf << 'EO_HTTPD_WSTUNNEL'
ProxyRequests Off
<Proxy *>
Require all granted
</Proxy>
ProxyPass /ws ws://127.0.0.1:8080
ProxyPassReverse /ws ws://127.0.0.1:8080
EO_HTTPD_WSTUNNEL
# Temporal quitar htaccess
sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/images/.htaccess
sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/attachment/.htaccess
@ -814,16 +796,6 @@ EO_LRA
chmod 0644 /etc/logrotate.d/pandora_server
chmod 0644 /etc/logrotate.d/pandora_agent
# Add websocket engine start script.
mv /var/www/html/pandora_console/pandora_websocket_engine /etc/init.d/ &>> "$LOGFILE"
chmod +x /etc/init.d/pandora_websocket_engine &>> "$LOGFILE"
# Start Websocket engine
/etc/init.d/pandora_websocket_engine start &>> "$LOGFILE"
# Configure websocket to be started at start.
systemctl enable pandora_websocket_engine &>> "$LOGFILE"
# Enable pandora ha service
systemctl enable pandora_server --now &>> "$LOGFILE"
execute_cmd "/etc/init.d/pandora_server start" "Starting Pandora FMS Server"

View File

@ -0,0 +1,783 @@
#!/bin/bash
#######################################################
# PandoraFMS Community online installation script
#######################################################
## Tested versions ##
# Rockylinux 9.3
# RHEL 9.3
#Constants
PANDORA_CONSOLE=/var/www/html/pandora_console
PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
S_VERSION='2024021301'
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
# define default variables
[ "$TZ" ] || TZ="Europe/Madrid"
[ "$MYVER" ] || MYVER=80
[ "$PHPVER" ] || PHPVER=8
[ "$DBHOST" ] || DBHOST=127.0.0.1
[ "$DBNAME" ] || DBNAME=pandora
[ "$DBUSER" ] || DBUSER=pandora
[ "$DBPASS" ] || DBPASS='Pandor4!'
[ "$DBPORT" ] || DBPORT=3306
[ "$DBROOTUSER" ] || DBROOTUSER=root
[ "$DBROOTPASS" ] || DBROOTPASS='Pandor4!'
[ "$SKIP_PRECHECK" ] || SKIP_PRECHECK=0
[ "$SKIP_DATABASE_INSTALL" ] || SKIP_DATABASE_INSTALL=0
[ "$SKIP_KERNEL_OPTIMIZATIONS" ] || SKIP_KERNEL_OPTIMIZATIONS=0
[ "$POOL_SIZE" ] || POOL_SIZE=$(grep -i total /proc/meminfo | head -1 | awk '{printf "%.2f \n", $(NF-1)*0.4/1024}' | sed "s/\\..*$/M/g")
[ "$PANDORA_LTS" ] || PANDORA_LTS=1
[ "$PANDORA_BETA" ] || PANDORA_BETA=0
[ "$RHEL_CHECK_SUBSCRIPTION" ] || RHEL_CHECK_SUBSCRIPTION=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"
cyan="\e[0;36m"
yellow="\e[33m"
reset="\e[0m"
# Functions
execute_cmd () {
local cmd="$1"
local msg="$2"
echo -e "${cyan}$msg...${reset}"
$cmd &>> "$LOGFILE"
if [ $? -ne 0 ]; then
echo -e "${red}Fail${reset}"
[ "$3" ] && echo "$3"
echo "Error installing Pandora FMS for detailed error please check log: $LOGFILE"
rm -rf "$HOME"/pandora_deploy_tmp &>> "$LOGFILE"
exit 1
else
echo -e "\e[1A\e ${cyan}$msg...${reset} ${green}OK${reset}"
return 0
fi
}
check_cmd_status () {
if [ $? -ne 0 ]; then
echo -e "${red}Fail${reset}"
[ "$1" ] && echo "$1"
echo "Error installing Pandora FMS for detailed error please check log: $LOGFILE"
rm -rf "$HOME"/pandora_deploy_tmp/*.rpm* &>> "$LOGFILE"
exit 1
else
echo -e "${green}OK${reset}"
return 0
fi
}
check_pre_pandora () {
echo -en "${cyan}Checking environment ... ${reset}"
rpm -qa | grep 'pandorafms_' | grep -v pandorafms_agent_* | grep -v "pandorawmic" | grep -v "pandorafms_made" &>> /dev/null && local fail=true
[ -d "$PANDORA_CONSOLE" ] && local fail=true
[ -f /usr/bin/pandora_server ] && local fail=true
if [ "$SKIP_DATABASE_INSTALL" -eq '0' ]; then
export MYSQL_PWD=$DBPASS
echo "use $DBNAME" | mysql -u$DBUSER -P$DBPORT -h$DBHOST &>> /dev/null && local fail=true
fi
[ ! $fail ]
check_cmd_status 'Error there is a current Pandora FMS installation on this node, please remove it to execute a clean install'
}
check_repo_connection () {
execute_cmd "ping -c 2 firefly.pandorafms.com" "Checking Community repo"
execute_cmd "ping -c 2 support.pandorafms.com" "Checking Enterprise repo"
}
check_root_permissions () {
echo -en "${cyan}Checking root account... ${reset}"
if [ "$(whoami)" != "root" ]; then
echo -e "${red}Fail${reset}"
echo "Please use a root account or sudo for installing Pandora FMS"
echo "Error installing Pandora FMS for detailed error please check log: $LOGFILE"
exit 1
else
echo -e "${green}OK${reset}"
fi
}
installing_docker () {
#Installing docker for debug
echo "Start installig docker" &>> "$LOGFILE"
dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo &>> "$LOGFILE"
dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin &>> "$LOGFILE"
systemctl disable --now docker &>> "$LOGFILE"
systemctl disable docker.socket --now &>> "$LOGFILE"
echo "End installig docker" &>> "$LOGFILE"
}
# Function to check if a password meets the MySQL secure password requirements
is_mysql_secure_password() {
local password=$1
# Check password length (at least 8 characters)
if [[ ${#password} -lt 8 ]]; then
echo "Password length should be at least 8 characters."
return 1
fi
# Check if password contains at least one uppercase letter
if [[ $password == ${password,,} ]]; then
echo "Password should contain at least one uppercase letter."
return 1
fi
# Check if password contains at least one lowercase letter
if [[ $password == ${password^^} ]]; then
echo "Password should contain at least one lowercase letter."
return 1
fi
# Check if password contains at least one digit
if ! [[ $password =~ [0-9] ]]; then
echo "Password should contain at least one digit."
return 1
fi
# Check if password contains at least one special character
if ! [[ $password =~ [[:punct:]] ]]; then
echo "Password should contain at least one special character."
return 1
fi
# Check if password is not a common pattern (e.g., "password", "123456")
local common_patterns=("password" "123456" "qwerty")
for pattern in "${common_patterns[@]}"; do
if [[ $password == *"$pattern"* ]]; then
echo "Password should not contain common patterns."
return 1
fi
done
# If all checks pass, the password is MySQL secure compliant
return 0
}
## 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"
exit 1
fi
echo -en "${cyan}Check Centos Version...${reset}"
[[ $(sed -nr 's/VERSION_ID+=\s*"([0-9]).*"$/\1/p' /etc/os-release) -eq '9' ]]
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 '"')
execute_cmd "echo $os_name" "OS detected: ${os_name}"
# initialice logfile
execute_cmd "echo 'Starting community deployment' > $LOGFILE" "All installer activity is logged on $LOGFILE"
echo "Community installer version: $S_VERSION" >> "$LOGFILE"
# Pre checks
# Root permisions
check_root_permissions
# Pre installed pandora
[ "$SKIP_PRECHECK" == 1 ] || check_pre_pandora
#advicing BETA PROGRAM
INSTALLING_VER="${green}RRR version enable using RRR PandoraFMS packages${reset}"
[ "$PANDORA_LTS" -ne '0' ] && INSTALLING_VER="${green}LTS version enable using LTS PandoraFMS packages${reset}"
[ "$PANDORA_BETA" -ne '0' ] && INSTALLING_VER="${red}BETA version enable using nightly PandoraFMS packages${reset}"
echo -e $INSTALLING_VER
# Connectivity
check_repo_connection
# Systemd
execute_cmd "systemctl status" "Checking SystemD" 'This is not a SystemD enable system, if tryng to use in a docker env please check: https://github.com/pandorafms/pandorafms/tree/develop/extras/docker/centos8'
# Check memomry greather or equal to 2G
execute_cmd "[ $(grep MemTotal /proc/meminfo | awk '{print $2}') -ge 1700000 ]" 'Checking memory (required: 2 GB)'
# Check disk size at least 10 Gb free space
execute_cmd "[ $(df -BM / | tail -1 | awk '{print $4}' | tr -d M) -gt 10000 ]" 'Checking Disk (required: 10 GB free min)'
# Setting timezone
rm -rf /etc/localtime &>> "$LOGFILE"
execute_cmd "timedatectl set-timezone $TZ" "Setting Timezone $TZ"
# Execute tools check
execute_cmd "awk --version" 'Checking needed tools: awk'
execute_cmd "grep --version" 'Checking needed tools: grep'
execute_cmd "sed --version" 'Checking needed tools: sed'
execute_cmd "dnf --version" 'Checking needed tools: dnf'
#Check mysql pass
execute_cmd "is_mysql_secure_password $DBROOTPASS" "Checking DBROOTPASS password match policy" 'This password do not match minimum MySQL policy requirements, more info in: https://dev.mysql.com/doc/refman/8.0/en/validate-password.html'
execute_cmd "is_mysql_secure_password $DBPASS" "Checking DBPASS password match policy" 'This password do not match minimum MySQL policy requirements, more info in: https://dev.mysql.com/doc/refman/8.0/en/validate-password.html'
# Creating working directory
rm -rf "$HOME"/pandora_deploy_tmp/*.rpm* &>> "$LOGFILE"
mkdir "$HOME"/pandora_deploy_tmp &>> "$LOGFILE"
execute_cmd "cd $HOME/pandora_deploy_tmp" "Moving to workspace: $HOME/pandora_deploy_tmp"
## Extra steps on redhat envs
if [ "$(grep -Ei 'Red Hat Enterprise' /etc/redhat-release)" ]; then
## In case REDHAT
if [ "$RHEL_CHECK_SUBSCRIPTION" -eq '1' ] ; then
# Check susbscription manager status:
echo -en "${cyan}Checking Red Hat Enterprise subscription... ${reset}"
subscription-manager list &>> "$LOGFILE"
subscription-manager status &>> "$LOGFILE"
check_cmd_status 'Error checking subscription status, make sure your server is activated and suscribed to Red Hat Enterprise repositories'
# Ckeck repolist
dnf repolist &>> "$LOGFILE"
echo -en "${cyan}Checking Red Hat Enterprise repolist... ${reset}"
dnf repolist | grep 'rhel-9-for-x86_64-baseos-rpms' &>> "$LOGFILE"
check_cmd_status 'Error checking repositories status, could try a subscription-manager attach command or contact sysadmin'
fi
#install extra repos
extra_repos=" \
tar \
dnf-utils \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \
https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm \
https://rpms.remirepo.net/enterprise/remi-release-9.rpm \
https://repo.percona.com/yum/percona-release-latest.noarch.rpm"
execute_cmd "dnf install -y $extra_repos" "Installing extra repositories"
execute_cmd "subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms" "Enabling subscription to codeready-builder"
else
# For alma/rocky/centos
extra_repos=" \
tar \
dnf-utils \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \
https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm \
https://rpms.remirepo.net/enterprise/remi-release-9.rpm \
https://repo.percona.com/yum/percona-release-latest.noarch.rpm"
execute_cmd "dnf install -y $extra_repos" "Installing extra repositories"
execute_cmd "dnf config-manager --enable crb" "Configuring crb"
fi
execute_cmd "installing_docker" "Installing Docker for debug"
#Installing wget
execute_cmd "dnf install -y wget" "Installing wget"
#Installing php
execute_cmd "dnf module reset -y php " "Disabling standard PHP module"
if [ "$PHPVER" -eq '8' ] ; then
PHPVER=8.2
fi
execute_cmd "dnf module install -y php:remi-$PHPVER" "Configuring PHP $PHPVER"
if [ "$MYVER" -eq '80' ] ; then
execute_cmd "percona-release setup ps80 -y" "Enabling mysql80 module"
execute_cmd "dnf install -y percona-server-server percona-xtrabackup-80" "Installing Percona Server 80"
fi
# Console dependencies
console_dependencies=" \
php \
postfix \
php-mcrypt \
php-cli \
php-gd \
php-curl \
php-session \
php-mysqlnd \
php-ldap \
php-zip \
php-zlib \
php-fileinfo \
php-gettext \
php-snmp \
php-mbstring \
php-pecl-zip \
php-xmlrpc \
libxslt \
wget \
php-xml \
httpd \
mod_php \
atk \
avahi-libs \
cairo \
cups-libs \
fribidi \
gd \
gdk-pixbuf2 \
ghostscript \
graphite2 \
graphviz \
gtk2 \
harfbuzz \
hicolor-icon-theme \
hwdata \
jasper-libs \
lcms2 \
libICE \
libSM \
libXaw \
libXcomposite \
libXcursor \
libXdamage \
libXext \
libXfixes \
libXft \
libXi \
libXinerama \
libXmu \
libXrandr \
libXrender \
libXt \
libXxf86vm \
libdrm \
libfontenc \
libglvnd \
libglvnd-egl \
libglvnd-glx \
libpciaccess \
librsvg2 \
libthai \
libtool-ltdl \
libwayland-client \
libwayland-server \
libxshmfence \
mesa-libEGL \
mesa-libGL \
mesa-libgbm \
mesa-libglapi \
pango \
pixman \
xorg-x11-fonts-75dpi \
xorg-x11-fonts-misc \
poppler-data \
php-yaml \
mod_ssl \
libzstd \
openldap-clients \
https://firefly.pandorafms.com/centos8/chromium-122.0.6261.128-1.el8.x86_64.rpm \
https://firefly.pandorafms.com/centos8/chromium-common-122.0.6261.128-1.el8.x86_64.rpm \
https://firefly.pandorafms.com/centos8/pandora_gotty-1.0-1.el8.x86_64.rpm \
https://firefly.pandorafms.com/centos8/pandorafms_made-0.1.0-1.el8.x86_64.rpm "
execute_cmd "dnf install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
# Server dependencies
server_dependencies=" \
perl \
vim \
fping \
perl-IO-Compress \
nmap \
sudo \
perl-Time-HiRes \
nfdump \
net-snmp-utils \
perl(NetAddr::IP) \
perl(Sys::Syslog) \
perl(DBI) \
perl(XML::Simple) \
perl(IO::Socket::INET6) \
perl(XML::Twig) \
perl-JSON \
expect \
openssh-clients \
java \
bind-utils \
whois \
libnsl \
libxcrypt-compat \
https://firefly.pandorafms.com/pandorafms-el9/perl-Geo-IP-1.51-1.el9.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"
#ipam dependencies
ipam_dependencies=" \
perl(NetAddr::IP) \
perl(Sys::Syslog) \
perl(DBI) \
perl(XML::Simple) \
perl(IO::Socket::INET6) \
perl(XML::Twig)"
execute_cmd "dnf install -y $ipam_dependencies" "Installing IPAM Instant client"
# Disabling SELINUX and firewalld
setenforce 0 &>> "$LOGFILE"
sed -i -e "s/^SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config &>> "$LOGFILE"
systemctl disable firewalld --now &>> "$LOGFILE"
# Adding standar cnf for initial setup.
cat > /etc/my.cnf << EO_CONFIG_TMP
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
EO_CONFIG_TMP
#Configuring Database
if [ "$SKIP_DATABASE_INSTALL" -eq '0' ] ; then
execute_cmd "systemctl start mysqld" "Starting database engine"
export MYSQL_PWD=$(grep "temporary password" /var/log/mysqld.log | rev | cut -d' ' -f1 | rev)
if [ "$MYVER" -eq '80' ] ; then
echo """
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = 'Pandor4!';
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = '$DBROOTPASS';
""" | mysql --connect-expired-password -u$DBROOTUSER &>> "$LOGFILE"
fi
if [ "$MYVER" -ne '80' ] ; then
echo """
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = PASSWORD('Pandor4!');
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = PASSWORD('$DBROOTPASS');
""" | mysql --connect-expired-password -u$DBROOTUSER &>> "$LOGFILE"fi
fi
export MYSQL_PWD=$DBROOTPASS
echo -en "${cyan}Creating Pandora FMS database...${reset}"
echo "create database $DBNAME" | mysql -u$DBROOTUSER -P$DBPORT -h$DBHOST
check_cmd_status "Error creating database $DBNAME, is this an empty node? if you have a previus installation please contact with support."
echo "CREATE USER \"$DBUSER\"@'%' IDENTIFIED BY \"$DBPASS\";" | mysql -u$DBROOTUSER -P$DBPORT -h$DBHOST
echo "ALTER USER \"$DBUSER\"@'%' IDENTIFIED WITH mysql_native_password BY \"$DBPASS\"" | mysql -u$DBROOTUSER -P$DBPORT -h$DBHOST
echo "GRANT ALL PRIVILEGES ON $DBNAME.* TO \"$DBUSER\"@'%'" | mysql -u$DBROOTUSER -P$DBPORT -h$DBHOST
#Generating my.cnf
cat > /etc/my.cnf << EO_CONFIG_F
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
character-set-server=utf8
skip-character-set-client-handshake
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Mysql optimizations for Pandora FMS
# Please check the documentation in https://pandorafms.com for better results
max_allowed_packet = 64M
innodb_buffer_pool_size = $POOL_SIZE
innodb_lock_wait_timeout = 90
innodb_file_per_table
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = O_DIRECT
innodb_log_file_size = 64M
innodb_log_buffer_size = 16M
innodb_io_capacity = 300
thread_cache_size = 8
thread_stack = 256K
max_connections = 100
key_buffer_size=4M
read_buffer_size=128K
read_rnd_buffer_size=128K
sort_buffer_size=128K
join_buffer_size=4M
#skip-log-bin
sql_mode=""
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
EO_CONFIG_F
execute_cmd "systemctl restart mysqld" "Configuring database engine"
execute_cmd "systemctl enable mysqld --now" "Enabling Database service"
fi
export MYSQL_PWD=$DBPASS
#Define packages
if [ "$PANDORA_LTS" -eq '1' ] ; then
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_server-7.0NG.noarch.rpm"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_console-7.0NG.noarch.rpm"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux_bin-7.0NG.x86_64.rpm"
elif [ "$PANDORA_LTS" -ne '1' ] ; then
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.x86_64.rpm"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.x86_64.rpm"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux_bin-7.0NG.x86_64.rpm"
fi
# if beta is enable
if [ "$PANDORA_BETA" -eq '1' ] ; then
PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm"
PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.x86_64.rpm"
PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux_bin-7.0NG.x86_64.rpm"
fi
# Downloading Pandora Packages
execute_cmd "curl -LSs --output pandorafms_server-7.0NG.noarch.rpm ${PANDORA_SERVER_PACKAGE}" "Downloading Pandora FMS Server community"
execute_cmd "curl -LSs --output pandorafms_console-7.0NG.noarch.rpm ${PANDORA_CONSOLE_PACKAGE}" "Downloading Pandora FMS Console community"
execute_cmd "curl -LSs --output pandorafms_agent_linux-7.0NG.noarch.rpm ${PANDORA_AGENT_PACKAGE}" "Downloading Pandora FMS Agent community"
# Install Pandora
execute_cmd "dnf install -y $HOME/pandora_deploy_tmp/pandorafms_console*.rpm $HOME/pandora_deploy_tmp/pandorafms_agent*.rpm" "Installing Pandora FMS packages"
execute_cmd "rpm -i --nodeps $HOME/pandora_deploy_tmp/pandorafms_server-7.0NG.noarch.rpm " "Installing Pandora FMS Server package"
# Enable Services
execute_cmd "systemctl enable httpd --now" "Enabling HTTPD service"
execute_cmd "systemctl enable php-fpm --now" "Enabling PHP-FPM service"
# Populate Database
echo -en "${cyan}Loading pandoradb.sql to $DBNAME database...${reset}"
mysql -u$DBUSER -P$DBPORT -h$DBHOST $DBNAME < $PANDORA_CONSOLE/pandoradb.sql &>> "$LOGFILE"
check_cmd_status 'Error Loading database schema'
echo -en "${cyan}Loading pandoradb_data.sql to $DBNAME database...${reset}"
mysql -u$DBUSER -P$DBPORT -h$DBHOST $DBNAME < $PANDORA_CONSOLE/pandoradb_data.sql &>> "$LOGFILE"
check_cmd_status 'Error Loading database schema data'
# Configure console
cat > $PANDORA_CONSOLE/include/config.php << EO_CONFIG_F
<?php
\$config["dbtype"] = "mysql";
\$config["dbname"]="$DBNAME";
\$config["dbuser"]="$DBUSER";
\$config["dbpass"]="$DBPASS";
\$config["dbhost"]="$DBHOST";
\$config["homedir"]="$PANDORA_CONSOLE";
\$config["homeurl"]="/pandora_console";
error_reporting(0);
\$ownDir = dirname(__FILE__) . '/';
include (\$ownDir . "config_process.php");
EO_CONFIG_F
cat > /etc/httpd/conf.d/pandora.conf << EO_CONFIG_F
ServerTokens Prod
<Directory "/var/www/html">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
EO_CONFIG_F
# Temporal quitar htaccess
sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/images/.htaccess
sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/attachment/.htaccess
# Fixing console permissions
chmod 600 $PANDORA_CONSOLE/include/config.php
chown apache. $PANDORA_CONSOLE/include/config.php
mv $PANDORA_CONSOLE/install.php $PANDORA_CONSOLE/install.done &>> "$LOGFILE"
# Prepare php.ini
sed -i -e "s/^max_input_time.*/max_input_time = -1/g" /etc/php.ini
sed -i -e "s/^max_execution_time.*/max_execution_time = 0/g" /etc/php.ini
sed -i -e "s/^upload_max_filesize.*/upload_max_filesize = 800M/g" /etc/php.ini
sed -i -e "s/^memory_limit.*/memory_limit = 800M/g" /etc/php.ini
sed -i -e "s/.*post_max_size =.*/post_max_size = 800M/" /etc/php.ini
#adding 900s to httpd timeout and 300 to ProxyTimeout
echo 'TimeOut 900' > /etc/httpd/conf.d/timeout.conf
echo 'ProxyTimeout 300' >> /etc/httpd/conf.d/timeout.conf
cat > /var/www/html/index.html << EOF_INDEX
<meta HTTP-EQUIV="REFRESH" content="0; url=/pandora_console/">
EOF_INDEX
execute_cmd "systemctl restart httpd" "Restarting httpd after configuration"
execute_cmd "systemctl restart php-fpm" "Restarting php-fpm after configuration"
# prepare snmptrapd
cat > /etc/snmp/snmptrapd.conf << EOF
authCommunity log public
disableAuthorization yes
EOF
# Prepare Server conf
sed -i -e "s/^dbhost.*/dbhost $DBHOST/g" $PANDORA_SERVER_CONF
sed -i -e "s/^dbname.*/dbname $DBNAME/g" $PANDORA_SERVER_CONF
sed -i -e "s/^dbuser.*/dbuser $DBUSER/g" $PANDORA_SERVER_CONF
sed -i -e "s|^dbpass.*|dbpass $DBPASS|g" $PANDORA_SERVER_CONF
sed -i -e "s/^dbport.*/dbport $DBPORT/g" $PANDORA_SERVER_CONF
sed -i -e "s/^#.mssql_driver.*/mssql_driver $MS_ID/g" $PANDORA_SERVER_CONF
#check fping
fping_bin=$(which fping)
execute_cmd "[ $fping_bin ]" "Check fping location: $fping_bin"
if [ "$fping_bin" != "" ]; then
sed -i -e "s|^fping.*|fping $fping_bin|g" $PANDORA_SERVER_CONF
fi
# Enable agent remote config
sed -i "s/^remote_config.*$/remote_config 1/g" $PANDORA_AGENT_CONF
# 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
# default=5
net.ipv4.tcp_syn_retries = 3
# default=5
net.ipv4.tcp_synack_retries = 3
# default=1024
net.ipv4.tcp_max_syn_backlog = 65536
# default=124928
net.core.wmem_max = 8388608
# default=131071
net.core.rmem_max = 8388608
# default = 128
net.core.somaxconn = 1024
# default = 20480
net.core.optmem_max = 81920
EO_KO
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
chown pandora:apache /var/log/pandora
chmod g+s /var/log/pandora
cat > /etc/logrotate.d/pandora_server <<EO_LR
/var/log/pandora/pandora_server.log
/var/log/pandora/web_socket.log
/var/log/pandora/pandora_server.error {
su root apache
weekly
missingok
size 300000
rotate 3
maxage 90
compress
notifempty
copytruncate
create 660 pandora apache
}
/var/log/pandora/pandora_snmptrap.log {
su root apache
weekly
missingok
size 500000
rotate 1
maxage 30
notifempty
copytruncate
create 660 pandora apache
}
EO_LR
cat > /etc/logrotate.d/pandora_agent <<EO_LRA
/var/log/pandora/pandora_agent.log {
su root apache
weekly
missingok
size 300000
rotate 3
maxage 90
compress
notifempty
copytruncate
}
EO_LRA
chmod 0644 /etc/logrotate.d/pandora_server
chmod 0644 /etc/logrotate.d/pandora_agent
# Enable pandora ha service
systemctl enable pandora_server --now &>> "$LOGFILE"
execute_cmd "/etc/init.d/pandora_server start" "Starting Pandora FMS Server"
# starting tentacle server
systemctl enable tentacle_serverd &>> "$LOGFILE"
execute_cmd "service tentacle_serverd start" "Starting Tentacle Server"
# Enabling console cron
execute_cmd "echo \"* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/cron.php >> $PANDORA_CONSOLE/log/cron.log\" >> /etc/crontab" "Enabling Pandora FMS Console cron"
echo "* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/cron.php >> $PANDORA_CONSOLE/log/cron.log" >> /etc/crontab
## Enabling agent
systemctl enable pandora_agent_daemon &>> "$LOGFILE"
execute_cmd "systemctl start pandora_agent_daemon" "Starting Pandora FMS Agent"
# Enable postfix
systemctl enable postfix --now &>> "$LOGFILE"
#SSH banner
[ "$(curl -s ifconfig.me)" ] && ipplublic=$(curl -s ifconfig.me)
cat > /etc/issue.net << EOF_banner
Welcome to Pandora FMS appliance on RHEL/Rocky Linux 8
------------------------------------------
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
EOF_banner
rm -f /etc/issue
ln -s /etc/issue.net /etc/issue
echo 'Banner /etc/issue.net' >> /etc/ssh/sshd_config
# Remove temporary files
execute_cmd "echo done" "Pandora FMS Community installed"
cd
execute_cmd "rm -rf $HOME/pandora_deploy_tmp" "Removing temporary files"
# Print nice finish message
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"}'

View File

@ -371,7 +371,7 @@ ln -s /usr/bin/fping /usr/sbin/fping &>> "$LOGFILE"
# Chrome
rm -f /usr/bin/chromium-browser &>> "$LOGFILE"
CHROME_VERSION=google-chrome-stable_110.0.5481.177-1_amd64.deb
CHROME_VERSION=google-chrome-stable_122.0.6261.128-1_amd64.deb
execute_cmd "wget https://dl.google.com/linux/deb/pool/main/g/google-chrome-stable/${CHROME_VERSION}" "Downloading google chrome"
execute_cmd "apt install -y ./${CHROME_VERSION}" "Intalling google chrome"
execute_cmd "ln -s /usr/bin/google-chrome /usr/bin/chromium-browser" "Creating /usr/bin/chromium-browser Symlink"
@ -601,6 +601,7 @@ EOF_PARAM
a2enmod ssl &>> "$LOGFILE"
a2enmod headers &>> "$LOGFILE"
a2enmod rewrite &>> "$LOGFILE"
a2enconf ssl-params &>> "$LOGFILE"
a2ensite default-ssl &>> "$LOGFILE"
a2enconf ssl-params &>> "$LOGFILE"
@ -640,24 +641,14 @@ EO_CONFIG_F
#Enable allow Override
cat > /etc/apache2/conf-enabled/pandora_security.conf << EO_CONFIG_F
ServerTokens Prod
<Directory "/var/www/html">
Options Indexes FollowSymLinks
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
EO_CONFIG_F
#Enable quickshell proxy
cat >> /etc/apache2/mods-enabled/00-proxy.conf << 'EO_HTTPD_WSTUNNEL'
ProxyRequests Off
<Proxy *>
Require all granted
</Proxy>
ProxyPass /ws ws://127.0.0.1:8080
ProxyPassReverse /ws ws://127.0.0.1:8080
EO_HTTPD_WSTUNNEL
# Fixing console permissions
chmod 600 $PANDORA_CONSOLE/include/config.php &>> "$LOGFILE"
chown -R www-data:www-data $PANDORA_CONSOLE &>> "$LOGFILE"
@ -812,16 +803,6 @@ EO_LRA
chmod 0644 /etc/logrotate.d/pandora_server
chmod 0644 /etc/logrotate.d/pandora_agent
# Add websocket engine start script.
mv /var/www/html/pandora_console/pandora_websocket_engine /etc/init.d/ &>> "$LOGFILE"
chmod +x /etc/init.d/pandora_websocket_engine &>> "$LOGFILE"
# Start Websocket engine
/etc/init.d/pandora_websocket_engine start &>> "$LOGFILE"
# Configure websocket to be started at start.
systemctl enable pandora_websocket_engine &>> "$LOGFILE"
# Enable pandora ha service
execute_cmd "/etc/init.d/pandora_server start" "Starting Pandora FMS Server"
systemctl enable pandora_server &>> "$LOGFILE"

View File

@ -92,12 +92,10 @@ RUN dnf install -y --setopt=tsflags=nodocs \
php-yaml \
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 \
chromium \
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.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm
RUN mkdir -p /run/php-fpm/ ; chown -R root:apache /run/php-fpm/
# Not installed perl-Net-Telnet gtk-update-icon-cach ghostscript-fonts
@ -116,7 +114,6 @@ RUN dnf install -y --setopt=tsflags=nodocs \
"perl(Sys::Syslog)" \
"perl(DBI)" \
"perl(XML::Simple)" \
"perl(Geo::IP)" \
"perl(IO::Socket::INET6)" \
"perl(XML::Twig)" \
expect \
@ -135,7 +132,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 "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(IO::Socket::INET6)" "perl(XML::Twig)" "perl(DBD::mysql)" --setopt=tsflags=nodocs
EXPOSE 80 443 41121 162/udp

View File

@ -64,7 +64,7 @@ wget $oconsoleurl
wget $oserverurl
if [ "$BASEBUILD" == 1 ] ; then
docker pull centos:8
docker pull rockylinux:8
# Open Base image
echo "building Base el8 image"
cd $DOCKER_PATH/base
@ -77,11 +77,11 @@ else
fi
if [ "$DBBUILD" == 1 ] ; then
docker pull percona:5.7
docker pull percona:8.0
# Percona image
echo "building Percona image"
cd $OPEN/extras/docker/percona
docker build -t $PERCONA_IMAGE:latest -f $OPEN/extras/docker/percona/Dockerfile $OPEN/extras/docker/percona
cd $OPEN/extras/docker/percona/8.0
docker build -t $PERCONA_IMAGE:latest -f $OPEN/extras/docker/percona/8.0/Dockerfile $OPEN/extras/docker/percona/8.0/
echo -e ">>>> \n"
fi

View File

@ -8,6 +8,8 @@ services:
image: pandorafms/pandorafms-percona-base
restart: always
#command: ["mysqld", "--innodb-buffer-pool-size=900M"]
cap_add:
- SYS_NICE # CAP_SYS_NICE
environment:
MYSQL_ROOT_PASSWORD: pandora
MYSQL_DATABASE: pandora

View File

@ -0,0 +1,11 @@
#docker build -t pandorafms/pandorafms-percona-base:80 .
#docker tag pandorafms/pandorafms-percona-base:80 pandorafms/pandorafms-percona-base:latest
#docker push pandorafms/pandorafms-percona-base:80
FROM percona:8.0
ADD pandora.cnf /etc/my.cnf.d/
USER root
RUN chown mysql:mysql /etc/my.cnf.d/pandora.cnf
USER mysql
EXPOSE 3306

View File

@ -0,0 +1,20 @@
# Use root/example as user/password credentials
# este compose incluye la base de datos en otro docker y levanta aplicacion y DB juntos
version: '3.1'
services:
db:
image: pandorafms/pandorafms-percona-base:80
restart: always
command: ["mysqld", "--innodb-buffer-pool-size=1G"]
cap_add:
- SYS_NICE # CAP_SYS_NICE
environment:
MYSQL_ROOT_PASSWORD: pandora
MYSQL_DATABASE: pandora
MYSQL_USER: pandora
MYSQL_PASSWORD: pandora
networks:
- pandora
networks:
pandora:

View File

@ -0,0 +1,39 @@
# copy this file to /etc/my.cnf.d/pandora.cnf directory inside the container to set the onfiguration
[mysqld]
datadir=/var/lib/mysql
user=mysql
character-set-server=utf8mb4
skip-character-set-client-handshake
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Mysql optimizations for Pandora FMS
# Please check the documentation in http://pandorafms.com for better results
max_allowed_packet = 64M
innodb_lock_wait_timeout = 90
innodb_file_per_table
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = O_DIRECT
innodb_log_file_size = 64M
innodb_log_buffer_size = 16M
innodb_io_capacity = 300
thread_cache_size = 8
thread_stack = 256K
max_connections = 100
key_buffer_size=4M
read_buffer_size=128K
read_rnd_buffer_size=128K
sort_buffer_size=128K
join_buffer_size=4M
# legacy compatibility
default_authentication_plugin=mysql_native_password
log_error_suppression_list='MY-013360'
skip-log-bin
sql_mode=""

View File

@ -0,0 +1,6 @@
docker run --name pandora-percona \
-e MYSQL_ROOT_PASSWORD=pandora \
-e MYSQL_DATABASE=pandora \
-e MYSQL_USER=pandora \
-e MYSQL_PASSWORD=pandora \
-d pandora_percona:80

View File

@ -1,33 +0,0 @@
###########################################
### SMTP DATA
###########################################
smtp_user devtest@artica.es
smtp_pass pass1212
smtp_hostname mail.artica.es
###########################################
### POP3 DATA
###########################################
pop3_user devtest@artica.es
pop3_pass pass1212
pop3_hostname mail.artica.es
# Enable or disable SSL. 1 means Enabled, 0 Disabled
pop3_ssl 0
# SSL port
pop3_ssl_port 995
###########################################
### TO SEND INFO
###########################################
# Email receiver where to send the email
receiver_email devtest@artica.es
###########################################
### PATH TO SAVE THE ATTACHED FILE
###########################################
# Desired path where the attached file will be stored
pathtosave /tmp/

View File

@ -1,318 +0,0 @@
#!/usr/bin/perl
##########################################################################
# Pandora FMS Mail Transfer
# This is a tool for transfering Pandora FMS data files by mail (SMTP/POP)
##########################################################################
# Copyright (c) 2011-2023 Pandora FMS
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
##########################################################################
use strict;
use warnings;
use Net::SMTP;
use Mail::POP3Client;
use MIME::Parser;
$| = 1;
# GLOBAL VARIABLES
my $boundary='frontier';
####### FUNCTIONS #######
########################################################################
## SUB check_args
## Checks the command line arguments given at the function call.
########################################################################
sub check_args(){
my $num_args = $#ARGV + 1;
my $action = $ARGV[0];
my $conf_file = $ARGV[1];
my $filename = $ARGV[2];
my $error = "Usage: mail_transfer.pl {send|receive conf_file [FILE]}\n";
my $error_conf_file = "conf_file does not exist or is not readable\n";
my $error_filename = "File to send does not exist or is not readable\n";
if (($num_args < 2) || (($action ne "send") && ($action ne "receive"))) {
die $error;
} elsif ((!(-e $conf_file)) || (!(-r $conf_file))) {
die $error_conf_file;
} elsif (($action eq "send") && ((!(-e $filename)) || (!(-r $filename)))) {
die $error_filename;
}
}
########################################################################
## SUB parse_conf
## Reads the entire conf file and stores all the information given
########################################################################
sub parse_conf ($$) {
my $conf_file = $_[0];
my $conf_hash = $_[1];
open (CONF, $conf_file);
my $line;
while (<CONF>)
{
$line = $_;
# Get the smtp user
if ($line =~ /^smtp_user\s([a-zA-Z0-9\.\_\-\@]+)/) {
$conf_hash -> {smtp_user} = $1;
}
# Get the smtp pass
elsif ($line =~ /^smtp_pass\s(.+)/) {
$conf_hash -> {smtp_pass} = $1;
}
# Get the smtp hostname
elsif ($line =~ /^smtp_hostname\s([a-zA-Z0-9\.\_\-\@]+)/) {
$conf_hash -> {smtp_hostname} = $1;
}
# Get the pop3 user
elsif ($line =~ /^pop3_user\s([a-zA-Z0-9\.\_\-\@]+)/) {
$conf_hash -> {pop3_user} = $1;
}
# Get the pop3 pass
elsif ($line =~ /^pop3_pass\s(.+)/) {
$conf_hash -> {pop3_pass} = $1;
}
# Get the pop3 hostname
elsif ($line =~ /^pop3_hostname\s([a-zA-Z0-9\.\_\-\@]+)/) {
$conf_hash -> {pop3_hostname} = $1;
}
# Get the pop3 ssl flag to know if it's enabled or not
elsif ($line =~ /^pop3_ssl\s(0|1)/) {
$conf_hash -> {pop3_ssl} = $1;
}
# Get the pop3 ssl port
elsif ($line =~ /^pop3_ssl_port\s([0-9]{1,5})/) {
$conf_hash -> {pop3_ssl_port} = $1;
}
# Get the path where to save the attached file
elsif ($line =~ /^pathtosave\s(.+)/) {
$conf_hash -> {pathtosave} = $1;
}
# Get the receiver's email where to send the attached file
elsif ($line =~ /^receiver_email\s([a-zA-Z0-9\.\_\-\@]+)/) {
$conf_hash -> {receiver_email} = $1;
}
}
close CONF;
}
########################################################################
## SUB send_mail
## Sends an attachement file via email using smtp
########################################################################
sub send_mail($) {
my $conf_hash = $_[0];
my $smtp;
my $attachment = $conf_hash -> {filename};
# Get the filename in case the full path was given
# Split the full path with '/', the last item will be the filename
my @file_path = split ('/', $attachment);
# Get the array's last position with '-1' index
my $attach_file = $file_path[-1];
my $host = $conf_hash -> {smtp_hostname};
my $from = $conf_hash -> {smtp_user};
my $password = $conf_hash -> {smtp_pass};
my $to = $conf_hash -> {receiver_email};
open(DATA, $attachment) || die("mail_transfer.pl: ERROR: Could not open the file $attach_file");
my @xml = <DATA>;
close(DATA);
$smtp = Net::SMTP->new($host,
Hello => $host,
Timeout => 30,
Debug => 0,
) || die("mail_trasfer.pl: ERROR: Could not connect to $host");
$smtp->auth($from, $password);
$smtp->mail($from);
$smtp->to($to);
$smtp->data();
$smtp->datasend("To: $to\n");
$smtp->datasend("From: $from\n");
$smtp->datasend("Subject: Pandora mail transfer\n");
$smtp->datasend("MIME-Version: 1.0\n");
$smtp->datasend("Content-Type: application/text; name=" . $attach_file . "\n");
$smtp->datasend("Content-Disposition: attachment; filename=" . $attach_file . "\n");
$smtp->datasend("Content-type: multipart/mixed boundary=" . $boundary . "\n");
$smtp->datasend("\n");
$smtp->datasend("@xml\n");
$smtp->dataend() || print "mail_transfer.pl: ERROR: Data end failed: $!";
$smtp->quit;
}
########################################################################
## SUB receive_mail
## Fetch the last email with 'Pandora mail transfer' as subject and
## download the attached file into the specified folder
########################################################################
sub receive_mail ($) {
my $conf_hash = $_[0];
my $user = $conf_hash -> {pop3_user};
my $password = $conf_hash -> {pop3_pass};
my $host = $conf_hash -> {pop3_hostname};
my $ssl = $conf_hash -> {pop3_ssl};
my $ssl_port = $conf_hash -> {pop3_ssl_port};
my $pathtosave = $conf_hash -> {pathtosave};
my $pop3;
if ($ssl == 1){
$pop3 = new Mail::POP3Client(
USER => $user,
PASSWORD => $password,
HOST => $host,
USESSL => 1,
PORT => $ssl_port,
DEBUG => 0
) or die "mail_transfer.pl: Connection failed\n";
} else {
$pop3 = new Mail::POP3Client(
USER => $user,
PASSWORD => $password,
HOST => $host,
USESSL => 0,
PORT => 110,
DEBUG => 0
) or die "mail_transfer.pl: Connection failed\n";
}
my $tot_msg = $pop3->Count();
if ($tot_msg == 0){
print "No more emails avalaible\n";
return (0); # End program
}
elsif ($tot_msg eq '0E0'){
print "No new emails available\n";
return (0);
}
else{
printf "There are $tot_msg messages \n\n";
}
# the list of valid file extensions. we do extensions, not
# mime-types, because they're easier to understand from
# an end-user perspective (no research is required).
my $valid_exts = "txt xml data";
my %msg_ids; # used to keep track of seen emails.
# create a subdirectory if does not exist
#print "Using directory '$pathtosave' for newly downloaded files.\n";
if (!(-d $pathtosave)) {
mkdir($pathtosave, 0777) or die "mail_transfer.pl: Error creating output directory\n";
}
# get the message to feed to MIME::Parser.
my $msg = $pop3->HeadAndBody($tot_msg);
my $header = $pop3->Head($tot_msg);
if (($header !~ /Subject:\sPandora\smail\stransfer/) || ($header !~ /boundary=$boundary/)) {
print "Deleting message not valid\n";
# delete current email
$pop3->Delete($tot_msg);
# clean up and close the connection.
$pop3->Close;
return -1;
}
# create a MIME::Parser object to
# extract any attachments found within.
my $parser = new MIME::Parser;
$parser->output_dir($pathtosave);
my $entity = $parser->parse_data($msg);
# extract our mime parts and go through each one.
my @parts = $entity->parts;
foreach my $part (@parts) {
# determine the path to the file in question.
my $path = ($part->bodyhandle) ? $part->bodyhandle->path : undef;
# move on if it's not defined,
# else figure out the extension.
next unless $path;
$path =~ /\w+\.([^.]+)$/;
my $ext = $1;
next unless $ext;
# we continue only if our extension is correct.
my $continue; $continue++ if $valid_exts =~ /$ext/i;
# delete the blasted thing.
unless ($valid_exts =~ /$ext/) {
print " Removing unwanted filetype ($ext): $path\n";
unlink $path or print " > Error removing file at $path: $!.";
next; # move on to the next attachment or message.
}
# a valid file type. yummy!
print " Keeping valid file: $path.\n";
}
# delete current email
$pop3->Delete($tot_msg);
# clean up and close the connection.
$pop3->Close;
}
####### MAIN #######
# Check the given command line arguments
check_args();
# Once checked store them
my $action = $ARGV[0];
my $conf_file = $ARGV[1];
my $filename = $ARGV[2];
# If the action is 'send', store the 'file_to_send'
my %conf_hash;
if ($action eq "send") {
$conf_hash {filename} = $filename;
}
# Parse the config file
parse_conf($conf_file, \%conf_hash);
# Call 'send_mail' function in its case
if ($action eq "send") {
send_mail(\%conf_hash);
}
# Or call the 'receive_mail' function.
my $returncode = 1;
if ($action eq "receive") {
while ($returncode != 0) {
$returncode = receive_mail(\%conf_hash);
}
}

View File

@ -1,106 +0,0 @@
Pandora Mail Transfer
======================
1st Edition , 3 May 2011
(c) Pandora FMS 2005-2023
(c) Juan Manuel Ramon <juanma@artica.es>
(c) Javier Lanz <javier.lanz@artica.es>
Description
-----------
Pandora Mail Transfer is a tool for sending and receiving xml files via email.
This script sends through a SMTP server, to the desired address, an email with an attached file.
Is able as well to fetch via POP3 that mail and its attached file.
It's designed to be used with an specific email account, so every time the script is called in “receive” mode, all emails on that account will be deleted. Do not use this script in a personal account because all your emails will be deleted.
This script is designed to send only text files, no binary files.
It's only possible to send .data, .txt, or .xml files.
Requisites
----------
In order to be able to use this application, it's a must having the following Perl's CPAN packages installed in your system:
Mail::POP3Client
MIME::Parser
Authen::SASL
Net::SMTP;
To install these libraries with CPAN, for example Mail::POP3Client:
cpan install Mail::POP3Client
To use the program under Windows, you will need to compile with a compiler like ActiveState PERL. The ActiveState environment allows as well to install CPAN modules easily.
Previous the script execution, it's a must having a configuration file, in which the mail server connection parameters will be defined.
Below it's shown a configuration file example, in which the necessary fields for the proper use of the mail transfer script are detailed.
Sample configuration file
-------------------------
###########################################
### SMTP DATA
###########################################
smtp_user username@domain.com
smtp_pass pass
smtp_hostname mailserver.domain.com
###########################################
### POP3 DATA
###########################################
pop3_user username@domain.com
pop3_pass pass
pop3_hostname mailserver.domain.com
# Enable or disable SSL. 1 means Enabled , 0 Disabled
pop3_ssl 0
# SSL port
pop3_ssl_port 995
###########################################
### TO SEND INFO
###########################################
# Email receiver where to send the email
receiver_email desired.mail@domain.com
###########################################
### PATH TO SAVE THE ATTACHED FILE
###########################################
# Desired path where the attached file will be stored
pathtosave /path/to/save/attached
Pandora mail transfer execution
-------------------------------
The proper way of executing the script should be according to...
./mail_transfer <action> <conf_file> [file_to_send]
Where the meaning of the fields are:
<action> could be 'send' or 'receive'
<conf_file> configuration file, explained above, contains every necessary data for sending and receiving emails.
[file_to_send] desired xml file to send (Only necessary in case of action = 'send')
Execution examples:
./mail_transfer send config_file.conf textfile.txt
./mail_transfer receive config_file.conf
Restrictions
------------
SSL Protocol
In this first version, SSL protocol is only implemented for the mail reception, not for sending.
Another related SSL Protocol restriction is the email erasing once read and downloaded to disk. In case of using SSL, deleting is not possible, on the other hand, if it's not used, the read mail will be properly deleted from the server once download to disk.
Attached file
There is a wee bug not fixed yet about the attached file name. If this one contains special characters such as '(' ')' '\' and more, while downloading from the server, it will be saved to disk with a different file name, probably wrong, although its content will be the right one. Thus, it's recommended not to use special characters in the file name.

View File

@ -1,664 +0,0 @@
#!/usr/bin/perl
# Pandora FMS Agent Plugin for SunONE
# (c) Pandora FMS <info@pandorafms.com> 2011
# v2, 1 Sep 2011
# ------------------------------------------------------------------------
use strict;
use warnings;
use IO::Socket::INET;
# OS and OS version
my $OS = $^O;
# Load on Win32 only
if ($OS eq "MSWin32"){
# Check dependencies
eval 'local $SIG{__DIE__}; use Win32::OLE("in");';
if ($@) {
print "Error loading Win32::Ole library. Cannot continue\n";
exit;
}
use constant wbemFlagReturnImmediately => 0x10;
use constant wbemFlagForwardOnly => 0x20;
}
my %plugin_setup; # This stores plugin parameters
my $archivo_cfg = $ARGV[0];
my $volume_items = 0;
my $log_items = 0;
my $webcheck_items = 0;
my $process_items = 0;
# FLUSH in each IO
$| = 1;
# ----------------------------------------------------------------------------
# This cleans DOS-like line and cleans ^M character. VERY Important when you process .conf edited from DOS
# ----------------------------------------------------------------------------
sub parse_dosline ($){
my $str = $_[0];
$str =~ s/\r//g;
return $str;
}
# ----------------------------------------------------------------------------
# Strips blank likes
# ----------------------------------------------------------------------------
sub trim ($){
my $string = shift;
$string =~ s/^\s+//;
$string =~ s/\s+$//;
return $string;
}
# ----------------------------------------------------------------------------
# clean_blank
#
# This function return a string without blankspaces, given a simple text string
# ----------------------------------------------------------------------------
sub clean_blank($){
my $input = $_[0];
$input =~ s/[\s\r\n]*//g;
return $input;
}
# ----------------------------------------------------------------------------
# print_module
#
# This function return a pandora FMS valid module fiven name, type, value, description
# ----------------------------------------------------------------------------
sub print_module ($$$$){
my $MODULE_NAME = $_[0];
my $MODULE_TYPE = $_[1];
my $MODULE_VALUE = $_[2];
my $MODULE_DESC = $_[3];
# If not a string type, remove all blank spaces!
if ($MODULE_TYPE !~ m/string/){
$MODULE_VALUE = clean_blank($MODULE_VALUE);
}
print "<module>\n";
print "<name>$MODULE_NAME</name>\n";
print "<type>$MODULE_TYPE</type>\n";
print "<data><![CDATA[$MODULE_VALUE]]></data>\n";
print "<description><![CDATA[$MODULE_DESC]]></description>\n";
print "</module>\n";
}
# ----------------------------------------------------------------------------
# load_external_setup
#
# Load external file containing configuration
# ----------------------------------------------------------------------------
sub load_external_setup ($); # Declaration due a recursive call to itself on includes
sub load_external_setup ($){
my $archivo_cfg = $_[0];
my $buffer_line;
my @config_file;
my $parametro = "";
# Collect items from config file and put in an array
if (! open (CFG, "< $archivo_cfg")) {
print "[ERROR] Error opening configuration file $archivo_cfg: $!.\n";
exit 1;
}
while (<CFG>){
$buffer_line = parse_dosline ($_);
# Parse configuration file, this is specially difficult because can contain SQL code, with many things
if ($buffer_line !~ /^\#/){ # begins with anything except # (for commenting)
if ($buffer_line =~ m/(.+)\s(.*)/){
push @config_file, $buffer_line;
}
}
}
close (CFG);
# Some plugin setup default options
$plugin_setup{"logparser"}="/etc/pandora/plugins/grep_log";
$plugin_setup{"timeout"} = 5;
$plugin_setup{"apache_stats"} = "";
foreach (@config_file){
$parametro = $_;
if ($parametro =~ m/^include\s(.*)/i) {
load_external_setup ($1);
}
if ($parametro =~ m/^logparser\s(.*)/i) {
$plugin_setup{"logparser"}=$1;
}
if ($parametro =~ m/^timeout\s(.*)/i) {
$plugin_setup{"timeout"}=clean_blank($1);
}
# Log check
if ($parametro =~ m/^log\s(.*)/i) {
$plugin_setup{"log"}->[$log_items]=$1;
$log_items++;
}
# Volume check
if ($parametro =~ m/^volume\s(.*)/i) {
$plugin_setup{"volume"}->[$volume_items]=$1;
$volume_items++;
}
# Webcheck
if ($parametro =~ m/^webcheck\s(.*)/i) {
$plugin_setup{"webcheck"}->[$webcheck_items]=$1;
$webcheck_items++;
}
# Processcheck
if ($parametro =~ m/^process\s(.*)/i) {
$plugin_setup{"process"}->[$process_items]=$1;
$process_items++;
}
# Apachestats
if ($parametro =~ m/^apache_stats\s(.*)/i) {
$plugin_setup{"apache_stats"}=$1;
}
}
}
# ----------------------------------------------------------------------------
# http_check
#
# This function recives something like 0.0.0.0:80 / 200 OK
# to check a HTTP response, given Host:PORT, URL and Search string
# Return 0 if not, and 1 if found
# ----------------------------------------------------------------------------
sub http_check ($$$$$){
my $name = $_[0];
my $host = $_[1];
my $port = $_[2];
my $query_string = $_[3];
my $search_string = $_[4];
my $tcp_send = "GET $query_string HTTP/1.0\n\n";
my $temp; my $match = 0;
my $sock = new IO::Socket::INET (
PeerAddr => $host,
PeerPort => $port,
Proto => 'tcp',
Timeout=> $plugin_setup{"timeout"},
Blocking=>1 ); # Non block gives non-accurate results. We need to be SURE about this results :(
if (!$sock){
print_module("web_$name", "generic_proc", 0, "HTTP Check on $host for $query_string");
return;
}
# Send data
$sock->autoflush(1);
$tcp_send =~ s/\^M/\r\n/g;
# Replace Carriage return and line feed
print $sock $tcp_send;
my @buffer = <$sock>;
# Search on buffer
foreach (@buffer) {
if ($_ =~ /$search_string/){
$match = 1;
last;
}
}
$sock->close;
print_module ("web_$name", "generic_proc", $match, "HTTP Check on $host for $query_string");
return;
}
# ----------------------------------------------------------------------------
# apache_stats
#
# This function uses mod_status from apache to get information
# Given Instance, Host:PORT, URL (usually should be /server-status)
# ----------------------------------------------------------------------------
sub apache_stats ($$$$){
my $name = $_[0];
my $host = $_[1];
my $port = $_[2];
my $query_string = $_[3];
if ($query_string eq ""){
$query_string = "/";
}
my $tcp_send = "GET $query_string HTTP/1.0\n\n";
my $temp; my $match = 0;
# First at all, check response on apache (200 OK)
http_check ("Apache_Status_$name", $host, $port, $query_string, "200 OK");
my $sock = new IO::Socket::INET (
PeerAddr => $host,
PeerPort => $port,
Proto => 'tcp',
Timeout=> $plugin_setup{"timeout"},
Blocking=>1 ); # Non block gives non-accurate results. We need to be SURE about this results :(
if (!$sock){
return;
}
# Send data
$sock->autoflush(1);
$tcp_send =~ s/\^M/\r\n/g;
# Replace Carriage return and line feed
print $sock $tcp_send;
my @buffer = <$sock>;
# Search on buffer
foreach (@buffer) {
if ($_ =~ /Restart Time: ([aA-zZ]+\,\s[0-9]{2}\-[aA-zZ]{3}\-[0-9]{4}\s[0-9]{2}\:[0-9]{2}\:[0-9]{2}\s[aA-zZ]+)/ ) {
print_module ("apache_restart_time_$name", "generic_data_string", $1, "" );
}
if ($_ =~ /Server uptime: ([aA-zZ 0-9]+)/) {
print_module ("apache_server_uptime_$name", "generic_data_string", $1, "" );
}
if ($_ =~ /Total accesses: ([0-9]+)/ ) {
print_module ("apache_accesses_$name", "generic_data_inc", $1, "" );
}
if ($_ =~ /Total Traffic: ([0-9]+)/ ) {
print_module ("apache_total_traffic_$name", "generic_data_inc", $1, "" );
}
if ($_ =~ /([0-9]+\.[0-9]+)\%\sCPU\sload/ ){
print_module ("apache_CPU_Load_$name", "generic_data", $1, "" );
}
if ($_ =~ /CPU Usage\: u([\.0-9]*)/ ){
print_module ("apache_CPU_User_Load_$name", "generic_data", $1, "" );
}
if ($_ =~ /CPU Usage\: u[\.0-9]* s([\.0-9]*)/ ){
print_module ("apache_CPU_System_Load_$name", "generic_data", $1, "" );
}
if ($_ =~ /([\.0-9]+)\srequests\/sec/){
print_module ("apache_Req/Sec_$name", "generic_data", $1, "" );
}
if ($_ =~ /([0-9]+)\sB\/second/) {
print_module ("apache_B/Sec_$name", "generic_data_inc", $1, "" );
}
if ($_ =~ /([0-9]+)\skB\/request/) {
print_module ("apache_KB/Request_$name", "generic_data_inc", $1, "" );
}
if ($_ =~ /([0-9]+)\srequests\scurrently/) {
print_module ("apache_request_currently_$name", "generic_data", $1, "" );
}
if ($_ =~ /([0-9]+)\sidle\sworkers/) {
print_module ("apache_idle_workers_$name", "generic_data", $1, "" );
}
}
$sock->close;
return;
}
# ----------------------------------------------------------------------------
# alert_log
#
# Do a call to alertlog plugin and output the result
# Receives logfile, and module name
# ----------------------------------------------------------------------------
sub alert_log($$$){
my $alertlog = $_[0];
my $module_name = $_[1];
my $log_expression = $_[2];
my $plugin_call = "";
# Call to logparser
if ($OS eq "MSWin32") {
$plugin_call = $plugin_setup{"logparser"}. " $alertlog $module_name $log_expression";
} else {
$plugin_call = $plugin_setup{"logparser"}. " $alertlog $module_name $log_expression 2> /dev/null";
}
my $output = `$plugin_call`;
if ($output ne ""){
print $output;
} else {
print_module($module_name, "async_string", "", "Alertlog for $alertlog ($log_expression)");
}
}
# ----------------------------------------------------------------------------
# spare_system_disk_win
#
# This function return % free disk on Windows, using WMI call
# ----------------------------------------------------------------------------
sub spare_system_disk_win ($$){
my $name = $_[0];
my $volume = $_[1];
my $computer = "localhost";
my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\CIMV2") or return;
my $colItems = $objWMIService->ExecQuery("SELECT * from CIM_LogicalDisk WHERE Name = '$volume'", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly);
foreach my $objItem (in $colItems) {
my $data = ($objItem->{"FreeSpace"} / $objItem->{"Size"}) * 100;
print_module("Volume_$volume" . "_" . "$name", "generic_data", "$data", "Free disk on $volume");
return;
}
}
# ----------------------------------------------------------------------------
# spare_system_disk
#
# Check free space on volume
# Receives volume name and instance
# ----------------------------------------------------------------------------
sub spare_system_disk ($$) {
my $name = $_[0];
my $vol = $_[1];
if ($vol eq ""){
return;
}
# This is a posix call, should be the same on all systems !
my $output = `df -kP | grep "$vol\$" | awk '{ print \$5 }' | tr -d "%"`;
my $disk_space = 100 - $output;
print_module("Volume_$vol" . "_" . "$name", "generic_data", $disk_space, "% of volume free");
}
# ----------------------------------------------------------------------------
# process_status_unix
#
# Generates a pandora module about the running status of a given process
# ----------------------------------------------------------------------------
sub process_status_unix ($$){
my $proc = $_[0];
my $proc_name = $_[1];
if ($proc eq ""){
return;
}
my $data = trim (`ps aux | grep "$proc" | grep -v grep | wc -l`);
print_module("Process_$proc_name", "generic_proc", $data, "Status of process $proc");
}
# ----------------------------------------------------------------------------
# process_status_win
#
# Generates a pandora module about the running status of a given process
# ----------------------------------------------------------------------------
sub process_status_win ($$){
my $proc = $_[0];
my $proc_name = $_[1];
if ($proc eq ""){
return;
}
my $computer = "localhost";
my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\CIMV2") or return;
my $colItems = $objWMIService->ExecQuery("SELECT * FROM Win32_Process WHERE Caption = '$proc'", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly);
foreach my $objItem (in $colItems) {
if ($objItem->{"Caption"} eq $proc){
print_module("Process_$proc_name", "generic_proc", 1, "Status of process $proc");
return;
} else {
print_module("Process_$proc_name", "generic_proc", 0, "Status of process $proc");
return;
}
}
# no matches, process is not running
print_module("Process_$proc_name", "generic_proc", 0, "Status of process $proc");
}
# ----------------------------------------------------------------------------
# process_mem_win
#
# Generates a Pandora FMS about memory usage of a given process "pepito.exe"
# only works with EXACT names.
# ----------------------------------------------------------------------------
sub process_mem_win ($$){
my $proc = $_[0];
my $proc_name = $_[1];
if ($proc eq ""){
return;
}
my $computer = "localhost";
my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\CIMV2") or return;
my $colItems = $objWMIService->ExecQuery("SELECT * FROM Win32_Process WHERE Caption = '$proc'", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly);
foreach my $objItem (in $colItems) {
if ($objItem->{"Caption"} eq $proc){
print_module("Process_MEM_$proc_name", "generic_data", $objItem->{"WorkingSetSize"}, "Memory in bytes of process $proc");
} else {
return;
}
}
}
# ----------------------------------------------------------------------------
# process_mem_unix
#
# Generates a Pandora FMS about memory usage of a given process
# ----------------------------------------------------------------------------
sub process_mem_unix ($$){
my $vol = $_[0];
my $proc_name = $_[1];
if ($vol eq ""){
return;
}
my $data = `ps aux | grep "$vol" | grep -v grep | awk '{ print \$6 }'`;
my @data2 = split ("\n", $data),
my $tot = 0;
foreach (@data2){
$tot = $tot + $_;
}
print_module("Proc_MEM_$proc_name", "generic_data", $tot, "Memory used (in bytes) for process $vol");
}
# ----------------------------------------------------------------------------
# process_cpu_unix
#
# Generates a Pandora FMS about memory usage of a given process
# ----------------------------------------------------------------------------
sub process_cpu_unix ($$) {
my $vol = $_[0];
my $proc_name = $_[1];
if ($vol eq ""){
return;
}
my $data = `ps aux | grep "$vol" | grep -v grep | awk '{ print \$3 }'`;
my @data2 = split ("\n", $data),
my $tot = 0;
foreach (@data2){
$tot = $tot + $_;
}
print_module("Proc_CPU_$proc_name", "generic_data", $tot, "CPU (%) used for process $vol");
}
#--------------------------------------------------------------------------------
#--------------------------------------------------------------------------------
# MAIN PROGRAM
# -------------------------------------------------------------------------------
#--------------------------------------------------------------------------------
# Parse external configuration file
# Load config file from command line
if ($#ARGV == -1 ){
print "I need at least one parameter: Complete path to external configuration file \n";
exit;
}
# Check for file
if ( ! -f $archivo_cfg ) {
printf "\n [ERROR] Cannot open configuration file at $archivo_cfg. \n\n";
exit 1;
}
load_external_setup ($archivo_cfg);
# Check for logparser, if not ready, skip all log check
if ( ! -f $plugin_setup{"logparser"} ) {
# Create a dummy check module with and advise warning
if ($log_items > 0) {
print_module("Error: Log parser not found", "async_string", 0, "Log parser not found, please check your configuration file and set it");
}
$log_items =0;
}
# Webchecks
if ($webcheck_items > 0){
my $ax;
for ($ax=0; $ax < $webcheck_items; $ax++){
my ($name, $host, $port, $url, $string) = split (";",$plugin_setup{"webcheck"}[$ax]);
http_check ($name, $host, $port, $url, $string);
}
}
# Check individual defined volumes
if ($volume_items > 0){
my $ax;
for ($ax=0; $ax < $volume_items; $ax++){
my ($name, $volume) = split (";",$plugin_setup{"volume"}[$ax]);
if ($OS eq "MSWin32"){
spare_system_disk_win ($name, $volume);
} else {
spare_system_disk ($name, $volume);
}
}
}
# Check individual defined logs
if ($log_items > 0){
my $ax;
for ($ax=0; $ax < $log_items; $ax++){
my ($logfile, $name, $expression) = split (";",$plugin_setup{"log"}[$ax]);
# Verify proper valid values here or skip
if (!defined($logfile)){
next;
}
if (!defined($name)){
next;
}
if (!defined($expression)){
next;
}
alert_log ($logfile, $name, $expression);
}
}
# Check individual defined process
if ($process_items > 0){
my $ax;
for ($ax=0; $ax < $process_items; $ax++){
my ($name, $process) = split (";",$plugin_setup{"process"}[$ax]);
if ($OS eq "MSWin32") {
process_status_win ($process, $name);
process_mem_win ($process, $name);
} else {
process_status_unix ($process, $name);
process_mem_unix ($process, $name);
process_cpu_unix ($process, $name);
}
}
}
# Apache stats
if ($plugin_setup{"apache_stats"} ne "") {
my ($name, $host, $port, $url) = split (";",$plugin_setup{"apache_stats"});
apache_stats ($name, $host, $port, $url);
}

View File

@ -234,16 +234,6 @@ module_description Number of cron task files
module_unit files
module_end
# This module /var/log/syslog file, under the module name "syslog"
# And search for "ssh" string into it, sending only that information.
module_begin
module_name Syslog
module_description Search for ssh string into /var/log/syslog file
module_type log
module_regexp /var/log/syslog
module_pattern ssh
module_end
#Hardening plugin for security compliance analysis. Enable to use it.
#module_begin
#module_plugin /usr/share/pandora_agent/plugins/pandora_hardening -t 150
@ -316,9 +306,9 @@ module_plugin pandora_df
# Extraction module example
#module_begin
#module_name Collector
#module_description Logs extraction module
#module_name Syslog
#module_description Gets all logs from system messages
#module_type log
#module_regexp /var/log/logfile.log
#module_regexp /var/log/messages
#module_pattern .*
#module_end
#module_end

View File

@ -354,11 +354,11 @@ module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\df.vbs"
#module_description Postcondition test module
#module_end
# Example of collector module
# Logs extraction
#module_begin
#module_name Collector
#module_description Logs extraction module
#module_name Syslog
#module_description Gets all logs from system messages
#module_type log
#module_regexp /var/log/logfile.log
#module_regexp C:\server\logs\messages
#module_pattern .*
#module_end

View File

@ -1,6 +1,9 @@
# -*- coding: utf-8 -*-
import wmi, sys, winreg, os, subprocess, json, re
from datetime import datetime, timedelta
import argparse
import configparser
## Define modules
modules=[]
@ -333,22 +336,19 @@ def check_password_enforcement():
print("Failed to check password enforcement for users.", file=sys.stderr)
def check_login_audit_policy():
def check_login_audit_policy(auditpol_logon_category, auditpol_logon_success_conf, auditpol_logon_noaudit_conf):
try:
# Run the auditpol command to check the audit policy for Logon/Logoff
cmd_command = "auditpol /get /subcategory:Logon"
result = subprocess.run(cmd_command, shell=True, capture_output=True, text=True, check=True)
last_line = result.stdout.strip().split('\n')[-1]
cmd_command = f'auditpol /get /subcategory:"{auditpol_logon_category}"'
result = subprocess.run(cmd_command, shell=True, capture_output=True, text=False, check=True)
stdout = result.stdout.decode('cp850', errors='replace')
last_line = stdout.strip().split('\n')[-1]
cleaned_line = re.sub(' +', ' ', last_line)
# Interpret the result
if "Success and Failure" in result.stdout:
if auditpol_logon_success_conf in stdout:
result = 1
elif "Aciertos y errores" in result.stdout:
result = 1
elif "No Auditing" in result.stdout:
result = 0
elif "Sin auditoría" in result.stdout:
elif auditpol_logon_noaudit_conf in stdout:
result = 0
else:
print("Unable to determine audit policy for Logon/Logoff events.", file=sys.stderr)
@ -366,14 +366,38 @@ def check_login_audit_policy():
print("Failed to check audit policy using auditpol command.", file=sys.stderr)
return
def parse_parameter(config=None, key="", default=""):
try:
return config.get("CONF", key)
except Exception as e:
return default
if __name__ == "__main__":
# Parse arguments
parser = argparse.ArgumentParser(description= "", formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument('--conf', help='Path to configuration file', metavar='<conf_file>', required=False)
args = parser.parse_args()
config = configparser.ConfigParser()
if(args.conf):
try:
with open(args.conf, 'r', encoding='utf-8') as f:
content = f.read()
config.read_string('[CONF]\n' + content)
except Exception as e:
print("Error while reading configuration file, using default values: "+str(e), file=sys.stderr)
auditpol_logon_category = parse_parameter(config, "auditpol_logon_category", "Logon")
auditpol_logon_success_conf = parse_parameter(config, "auditpol_logon_success_conf", "Success and Failure")
auditpol_logon_noaudit_conf = parse_parameter(config, "auditpol_logon_noaudit_conf", "No Auditing")
check_antivirus_status()
check_locksreen_enables()
get_windows_update_info()
is_firewall_enabled()
check_password_enforcement()
check_login_audit_policy()
check_login_audit_policy(auditpol_logon_category, auditpol_logon_success_conf, auditpol_logon_noaudit_conf)
for module in modules:
print_module(module, True)

View File

@ -163,26 +163,16 @@ module_end
#module_absoluteinterval 7d
#module_end
# This module parses /var/log/syslog file, under the module name "syslog"
# And search for "ssh" string into it, sending only that information.
module_begin
module_name Syslog
module_description Search for ssh string into /var/log/syslog file
module_type log
module_regexp /var/log/syslog
module_pattern ssh
module_end
# Plugin example
# Plugin for inventory on the agent.
# module_plugin inventory 1 cpu ram video nic hd cdrom software
# Extraction module example
# Logs extraction
#module_begin
#module_name Collector
#module_description Logs extraction module
#module_name Syslog
#module_description Gets all logs from system messages
#module_type log
#module_regexp /var/log/logfile.log
#module_regexp /var/log/messages
#module_pattern .*
#module_end

View File

@ -378,26 +378,16 @@ module_end
#module_absoluteinterval 7d
#module_end
# This module parses /var/log/syslog file, under the module name "syslog"
# And search for "ssh" string into it, sending only that information.
module_begin
module_name Syslog
module_description Log collection modules
module_type log
module_regexp /var/log/syslog
module_pattern ssh
module_end
# Plugin example
# Plugin for inventory on the agent.
# module_plugin inventory 1 cpu ram video nic hd cdrom software
# Extraction module example
# Logs extraction
#module_begin
#module_name Collector
#module_description Logs extraction module
#module_name Syslog
#module_description Gets all logs from system messages
#module_type log
#module_regexp /var/log/logfile.log
#module_regexp /var/log/messages
#module_pattern .*
#module_end

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.776-240322
Version: 7.0NG.776-240426
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.776-240322"
pandora_version="7.0NG.776-240426"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -277,4 +277,10 @@ module_plugin grep_log /var/log/auth.log Syslog sshd
# Log collection modules. Only for enterprise version, this will collect log files for forensic analysis.
# This is for LOG monitoring, only on enterprise version
#module_plugin grep_log_module /var/log/messages Syslog \.\*
#module_begin
#module_name Syslog
#module_description Gets all logs from system messages
#module_type log
#module_regexp /var/log/messages
#module_pattern .*
#module_end

View File

@ -270,6 +270,9 @@ module_plugin pandora_netusage
# Service autodiscovery plugin
module_plugin autodiscover --default
# This plugin runs several security checks in a Linux system
# module_plugin perl /usr/share/pandora_agent/plugins/pandora_security_check --conf /usr/share/pandora_agent/plugins/pandora_security_check.conf
# Plugin for inventory on the agent.
# module_plugin inventory 1 cpu ram video nic hd cdrom software init_services filesystem users route
@ -322,12 +325,3 @@ module_end
#module_plugin /usr/share/pandora_agent/plugins/pandora_hardening -t 150
#module_absoluteinterval 7d
#module_end
# Extraction module example
#module_begin
#module_name Collector
#module_description Logs extraction module
#module_type log
#module_regexp /var/log/logfile.log
#module_pattern .*
#module_end

View File

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

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.776
%define release 240322
%define release 240426
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.776
%define release 240322
%define release 240426
%define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version

View File

@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.776
%define release 240322
%define release 240426
%define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version

View File

@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.776
%define release 240322
%define release 240426
Summary: Pandora FMS Linux agent, binary version
Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.776
%define release 240322
%define release 240426
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.776"
PI_BUILD="240322"
PI_BUILD="240426"
OS_NAME=`uname -s`
FORCE=0

11
pandora_agents/unix/plugins/autodiscover Normal file → Executable file
View File

@ -22,12 +22,19 @@ try:
from subprocess import PIPE
from subprocess import DEVNULL
from subprocess import getstatusoutput
import signal
except ModuleNotFoundError as err:
print("{} error: {}. Exiting...".format(argv[0], err), file=stderr)
exit(1)
module_list = []
VERSION = "1.2"
VERSION = "1.3"
# Define a function to handle the SIGTERM signal
def sigterm_handler(signum, frame):
print("Received SIGTERM signal. Cleaning up...")
sys.exit(0)
signal.signal(signal.SIGTERM, sigterm_handler)
def win_service(servicelist, option=False, memcpu=False):
@ -74,7 +81,7 @@ def win_service(servicelist, option=False, memcpu=False):
def lnx_service(services_list, memcpu=False):
"""Creates modules for Linux servers"""
modules = []
sysctl = getstatusoutput("command -v systemctl")[0]
sysctl = getstatusoutput("systemd-notify --booted")[0]
servic = getstatusoutput("command -v service")[0]
for srvc in services_list:
status = None

View File

@ -297,6 +297,10 @@ sub parse_configuration {
$line =~ s/^\s+//;
$line =~ s/\s+$//;
if($line =~ /^$/) {
next;
}
if ($line =~ /^\[($b_ports|$b_files|$b_passwords)\]$/) {
$configuration_block = $1;
}
@ -537,7 +541,6 @@ if ($check_files) {
if ($can_check_files) {
# Check each file integrity
my @errored_files;
my @no_integrity_files;
# Create unique check files list
@ -556,8 +559,6 @@ if ($check_files) {
push @no_integrity_files, $file;
}
$integrity{$file_key} = $file_md5;
} else {
push @errored_files, $file;
}
}
@ -571,11 +572,6 @@ if ($check_files) {
$value = 0;
$desc = "Changed files found:\n" . join("\n", @no_integrity_files);
}
if (@errored_files) {
$value = 0;
$desc .= "\nUnable to check integrity of some files:\n" . join("\n", @errored_files);
}
}
print_xml_module('Files check status', 'generic_proc', $desc, $value);
@ -596,10 +592,15 @@ if ($check_passwords) {
open my $shadow_fh, '<', $shadow_file;
while (my $line = <$shadow_fh>) {
chomp $line;
if($line =~ /^$/) {
next;
}
my ($username, $password_hash, @rest) = split /:/, $line;
# Skip users with no password hash
if ($password_hash ne "*" && $password_hash ne "!!" && $password_hash ne "!locked") {
if ($password_hash ne "*" && $password_hash ne "!!" && $password_hash ne "!locked" && $password_hash ne "!*") {
my $salt = substr($password_hash, 0, rindex($password_hash, '$') + 1);
my $user_hash = crypt($username, $salt);
if ($user_hash eq $password_hash) {

View File

@ -0,0 +1,22 @@
[PORTS]
22
80
443
41121
8080
[FILES]
/etc/httpd/httpd.conf
/etc/my.cnf
/etc/sudoers
/etc/passwd
/etc/hosts
[PASSWORDS]
pandora
PANDORA
P4nd0r4
password
root
linux
admin

View File

@ -289,14 +289,6 @@ module_plugin "%PROGRAMFILES%\Pandora_Agent\util\autodiscover.exe" --default
#module_type generic_data_string
#module_end
# Get logs from Application source. Need enterprise version.
#module_begin
#module_name Eventlog_Application
#module_type log
#module_logevent
#module_source Application
#module_end
# Example: get Network information using Agent plugin
#module_plugin cscript //B "%ProgramFiles%\Pandora_Agent\util\nettraffic.vbs"
@ -533,10 +525,10 @@ module_plugin "%PROGRAMFILES%\Pandora_Agent\util\autodiscover.exe" --default
# Logs extraction
#module_begin
#module_name X_Server_log
#module_description Logs extraction module
#module_name Syslog
#module_description Gets all logs from system messages
#module_type log
#module_regexp C:\server\logs\xserver.log
#module_regexp C:\server\logs\messages
#module_pattern .*
#module_end

View File

@ -0,0 +1,8 @@
auditpol_logon_category = Logon
#auditpol_logon_category = Inicio de sesión
auditpol_logon_success_conf = Success and Failure
#auditpol_logon_success_conf = Aciertos y errores
auditpol_logon_noaudit_conf = No Auditing
#auditpol_logon_noaudit_conf = Sin auditoría

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c58891fbd16bf80f288e0ff4751801aa02dbf4e6c914625b4d49a364c7e0b511
size 7829249
oid sha256:293dc77d39c303793a73bf83a2698c5886331f24b8abed4a40566474a64e3f60
size 7735667

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{240322}
{240426}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.776 Build 240322")
#define PANDORA_VERSION ("7.0NG.776 Build 240426")
string pandora_path;
string pandora_dir;
@ -53,6 +53,9 @@ Key_Value::parseLine (string str) {
string trimmedstr;
trimmedstr = trim (str);
if (trimmedstr == "") {
return;
}
/* Check if the string has " */
pos = trimmedstr.find ("\"");

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Pandora FMS"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.776(Build 240322))"
VALUE "ProductVersion", "(7.0NG.776(Build 240426))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.776-240322
Version: 7.0NG.776-240426
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.776-240322"
pandora_version="7.0NG.776-240426"
package_pear=0
package_pandora=1

View File

@ -4675,8 +4675,9 @@
return (
"function" == typeof _ &&
"function" == typeof Symbol &&
"symbol" == typeof _("foo") &&
"symbol" == typeof Symbol("bar") && w()
"symbol" == typeof _("foo") &&
"symbol" == typeof Symbol("bar") &&
w()
);
};
},
@ -13386,7 +13387,9 @@
null != s &&
!w(s)
) ||
j.test(s) || !x.test(s) || (null != i && s in Object(i))
j.test(s) ||
!x.test(s) ||
(null != i && s in Object(i))
);
};
},
@ -20230,7 +20233,8 @@
var i = s.memoizedState;
if (
(null === i &&
null !== (s = s.alternate) && (i = s.memoizedState),
null !== (s = s.alternate) &&
(i = s.memoizedState),
null !== i)
)
return i.dehydrated;
@ -21697,7 +21701,8 @@
null !== ae &&
((Z = ae),
null !== X &&
null != (ae = Kb(ee, X)) && U.push(tf(ee, ae, Z))),
null != (ae = Kb(ee, X)) &&
U.push(tf(ee, ae, Z))),
Y)
)
break;
@ -21894,9 +21899,9 @@
}
})(s, u)) &&
0 < (_ = oe(_, "onBeforeInput")).length &&
((w = new fr("onBeforeInput", "beforeinput", null, u, w)),
j.push({ event: w, listeners: _ }),
(w.data = ce));
((w = new fr("onBeforeInput", "beforeinput", null, u, w)),
j.push({ event: w, listeners: _ }),
(w.data = ce));
}
se(j, i);
});
@ -22535,8 +22540,8 @@
var U = s.alternate;
null !== U &&
(P = (U = U.updateQueue).lastBaseUpdate) !== j &&
(null === P ? (U.firstBaseUpdate = $) : (P.next = $),
(U.lastBaseUpdate = B));
(null === P ? (U.firstBaseUpdate = $) : (P.next = $),
(U.lastBaseUpdate = B));
}
if (null !== x) {
var Y = w.baseState;
@ -22675,7 +22680,8 @@
? s.shouldComponentUpdate(_, x, j)
: !i.prototype ||
!i.prototype.isPureReactComponent ||
!Ie(u, _) || !Ie(w, x);
!Ie(u, _) ||
!Ie(w, x);
}
function ph(s, i, u) {
var _ = !1,
@ -25167,11 +25173,11 @@
(s.sibling = null),
5 === s.tag &&
null !== (i = s.stateNode) &&
(delete i[gn],
delete i[yn],
delete i[vn],
delete i[_n],
delete i[wn]),
(delete i[gn],
delete i[yn],
delete i[vn],
delete i[_n],
delete i[wn]),
(s.stateNode = null),
(s.return = null),
(s.dependencies = null),
@ -25282,7 +25288,8 @@
case 15:
if (
!Po &&
null !== (_ = u.updateQueue) && null !== (_ = _.lastEffect)
null !== (_ = u.updateQueue) &&
null !== (_ = _.lastEffect)
) {
w = _ = _.next;
do {
@ -26026,7 +26033,8 @@
return !0;
})(w) &&
(2 === (i = Jk(s, _)) &&
0 !== (x = xc(s)) && ((_ = x), (i = Ok(s, x))),
0 !== (x = xc(s)) &&
((_ = x), (i = Ok(s, x))),
1 === i))
)
throw ((u = Go), Lk(s, 0), Dk(s, _), Ek(s, yt()), u);
@ -28469,7 +28477,8 @@
return (
void 0 !== this._readableState &&
void 0 !== this._writableState &&
this._readableState.destroyed && this._writableState.destroyed
this._readableState.destroyed &&
this._writableState.destroyed
);
},
set: function set(s) {
@ -29506,7 +29515,8 @@
return (
!!$.call(this, s) ||
(this === Writable &&
s && s._writableState instanceof WritableState)
s &&
s._writableState instanceof WritableState)
);
}
}))
@ -33989,7 +33999,8 @@
j = s;
if (
"object" == typeof s &&
(j = s[(_ = Object.keys(s)[0])]) && j._elem
(j = s[(_ = Object.keys(s)[0])]) &&
j._elem
)
return (
(j._elem.name = _),
@ -46937,10 +46948,11 @@
!!Jl(s) ||
(!!s &&
"object" == typeof s &&
!_isString(s) &&
(0 === s.length ||
(s.length > 0 &&
s.hasOwnProperty(0) && s.hasOwnProperty(s.length - 1))))
!_isString(s) &&
(0 === s.length ||
(s.length > 0 &&
s.hasOwnProperty(0) &&
s.hasOwnProperty(s.length - 1))))
);
});
var sc = "undefined" != typeof Symbol ? Symbol.iterator : "@@iterator";
@ -48536,10 +48548,10 @@
? !(!s || "object" != typeof s || "string" != typeof s.uri)
: ("undefined" != typeof File && s instanceof File) ||
("undefined" != typeof Blob && s instanceof Blob) ||
!!ArrayBuffer.isView(s) ||
(null !== s &&
"object" == typeof s &&
"function" == typeof s.pipe)
!!ArrayBuffer.isView(s) ||
(null !== s &&
"object" == typeof s &&
"function" == typeof s.pipe)
);
}
function isArrayOfFile(s, i) {
@ -49050,7 +49062,8 @@
"object" == typeof i &&
null !== i &&
"primitive" in i &&
"function" == typeof i.primitive && i.primitive() === s,
"function" == typeof i.primitive &&
i.primitive() === s,
hasClass = (s, i) =>
"object" == typeof i &&
null !== i &&
@ -58899,13 +58912,12 @@
const parameterEquals = (i, u) =>
!!s.isParameterElement(i) &&
!!s.isParameterElement(u) &&
!!s.isStringElement(i.name) &&
!!s.isStringElement(i.in) &&
!!s.isStringElement(u.name) &&
!!s.isStringElement(u.in) &&
serializers_value(i.name) ===
serializers_value(u.name) &&
serializers_value(i.in) === serializers_value(u.in),
!!s.isStringElement(i.name) &&
!!s.isStringElement(i.in) &&
!!s.isStringElement(u.name) &&
!!s.isStringElement(u.in) &&
serializers_value(i.name) === serializers_value(u.name) &&
serializers_value(i.in) === serializers_value(u.in),
i = [];
return {
visitor: {
@ -62689,20 +62701,18 @@
He.createElement(
"div",
{ className: "modal-ux-content" },
j
.valueSeq()
.map((j, B) =>
He.createElement(P, {
key: B,
AST: x,
definitions: j,
getComponent: u,
errSelectors: _,
authSelectors: s,
authActions: i,
specSelectors: w
})
)
j.valueSeq().map((j, B) =>
He.createElement(P, {
key: B,
AST: x,
definitions: j,
getComponent: u,
errSelectors: _,
authSelectors: s,
authActions: i,
specSelectors: w
})
)
)
)
)
@ -65124,15 +65134,13 @@
He.createElement(
"tbody",
null,
s
.entrySeq()
.map(([s, i]) =>
He.createElement(u, {
key: `${s}-${i}`,
xKey: s,
xVal: i
})
)
s.entrySeq().map(([s, i]) =>
He.createElement(u, {
key: `${s}-${i}`,
xKey: s,
xVal: i
})
)
)
)
)
@ -65560,15 +65568,13 @@
He.createElement(_e, { source: _.get("description") })
),
ie && le.size
? le
.entrySeq()
.map(([s, i]) =>
He.createElement(de, {
key: `${s}-${i}`,
xKey: s,
xVal: i
})
)
? le.entrySeq().map(([s, i]) =>
He.createElement(de, {
key: `${s}-${i}`,
xKey: s,
xVal: i
})
)
: null,
ae && _.get("content")
? He.createElement(
@ -66472,26 +66478,22 @@
")"
),
Z && et.size
? et
.entrySeq()
.map(([s, i]) =>
He.createElement(de, {
key: `${s}-${i}`,
xKey: s,
xVal: i
})
)
? et.entrySeq().map(([s, i]) =>
He.createElement(de, {
key: `${s}-${i}`,
xKey: s,
xVal: i
})
)
: null,
X && tt.size
? tt
.entrySeq()
.map(([s, i]) =>
He.createElement(de, {
key: `${s}-${i}`,
xKey: s,
xVal: i
})
)
? tt.entrySeq().map(([s, i]) =>
He.createElement(de, {
key: `${s}-${i}`,
xKey: s,
xVal: i
})
)
: null
),
He.createElement(
@ -68903,16 +68905,14 @@
He.createElement("span", { className: "brace-close" }, "}")
),
ye.size
? ye
.entrySeq()
.map(([s, i]) =>
He.createElement(Re, {
key: `${s}-${i}`,
propKey: s,
propVal: i,
propClass: "property"
})
)
? ye.entrySeq().map(([s, i]) =>
He.createElement(Re, {
key: `${s}-${i}`,
propKey: s,
propVal: i,
propClass: "property"
})
)
: null
);
}
@ -69093,28 +69093,24 @@
")"
),
ae.size
? ae
.entrySeq()
.map(([s, i]) =>
He.createElement(de, {
key: `${s}-${i}`,
propKey: s,
propVal: i,
propClass: eI
})
)
? ae.entrySeq().map(([s, i]) =>
He.createElement(de, {
key: `${s}-${i}`,
propKey: s,
propVal: i,
propClass: eI
})
)
: null,
P && ee.size
? ee
.entrySeq()
.map(([s, i]) =>
He.createElement(de, {
key: `${s}-${i}`,
propKey: s,
propVal: i,
propClass: eI
})
)
? ee.entrySeq().map(([s, i]) =>
He.createElement(de, {
key: `${s}-${i}`,
propKey: s,
propVal: i,
propClass: eI
})
)
: null,
Z ? He.createElement(ce, { source: Z }) : null,
ie &&
@ -69448,12 +69444,13 @@
return (
!(s >= 55296 && s <= 57343) &&
!(s >= 64976 && s <= 65007) &&
65535 != (65535 & s) &&
65534 != (65535 & s) &&
!(s >= 0 && s <= 8) &&
11 !== s &&
!(s >= 14 && s <= 31) &&
!(s >= 127 && s <= 159) && !(s > 1114111)
65535 != (65535 & s) &&
65534 != (65535 & s) &&
!(s >= 0 && s <= 8) &&
11 !== s &&
!(s >= 14 && s <= 31) &&
!(s >= 127 && s <= 159) &&
!(s > 1114111)
);
}
function fromCodePoint(s) {
@ -71014,37 +71011,37 @@
return (
P !== $ + 2 &&
!(P + 1 >= U || 58 !== s.src.charCodeAt(++P)) &&
(_ ||
(P++,
s.env.footnotes || (s.env.footnotes = {}),
s.env.footnotes.refs || (s.env.footnotes.refs = {}),
(B = s.src.slice($ + 2, P - 2)),
(s.env.footnotes.refs[":" + B] = -1),
s.tokens.push({
type: "footnote_reference_open",
label: B,
level: s.level++
}),
(w = s.bMarks[i]),
(x = s.tShift[i]),
(j = s.parentType),
(s.tShift[i] = s.skipSpaces(P) - P),
(s.bMarks[i] = P),
(s.blkIndent += 4),
(s.parentType = "footnote"),
s.tShift[i] < s.blkIndent &&
((s.tShift[i] += s.blkIndent),
(s.bMarks[i] -= s.blkIndent)),
s.parser.tokenize(s, i, u, !0),
(s.parentType = j),
(s.blkIndent -= 4),
(s.tShift[i] = x),
(s.bMarks[i] = w),
s.tokens.push({
type: "footnote_reference_close",
level: --s.level
})),
!0)
(_ ||
(P++,
s.env.footnotes || (s.env.footnotes = {}),
s.env.footnotes.refs || (s.env.footnotes.refs = {}),
(B = s.src.slice($ + 2, P - 2)),
(s.env.footnotes.refs[":" + B] = -1),
s.tokens.push({
type: "footnote_reference_open",
label: B,
level: s.level++
}),
(w = s.bMarks[i]),
(x = s.tShift[i]),
(j = s.parentType),
(s.tShift[i] = s.skipSpaces(P) - P),
(s.bMarks[i] = P),
(s.blkIndent += 4),
(s.parentType = "footnote"),
s.tShift[i] < s.blkIndent &&
((s.tShift[i] += s.blkIndent),
(s.bMarks[i] -= s.blkIndent)),
s.parser.tokenize(s, i, u, !0),
(s.parentType = j),
(s.blkIndent -= 4),
(s.tShift[i] = x),
(s.bMarks[i] = w),
s.tokens.push({
type: "footnote_reference_close",
level: --s.level
})),
!0)
);
},
["paragraph"]
@ -71107,32 +71104,32 @@
return (
!(j >= u) &&
!(s.tShift[j] < s.blkIndent) &&
!(s.tShift[j] - s.blkIndent > 3) &&
!((w = s.bMarks[j] + s.tShift[j]) >= (x = s.eMarks[j])) &&
(45 === (_ = s.src.charCodeAt(w)) || 61 === _) &&
((w = s.skipChars(w, _)),
!((w = s.skipSpaces(w)) < x) &&
((w = s.bMarks[i] + s.tShift[i]),
(s.line = j + 1),
s.tokens.push({
type: "heading_open",
hLevel: 61 === _ ? 1 : 2,
lines: [i, s.line],
level: s.level
}),
s.tokens.push({
type: "inline",
content: s.src.slice(w, s.eMarks[i]).trim(),
level: s.level + 1,
lines: [i, s.line - 1],
children: []
}),
s.tokens.push({
type: "heading_close",
hLevel: 61 === _ ? 1 : 2,
level: s.level
}),
!0))
!(s.tShift[j] - s.blkIndent > 3) &&
!((w = s.bMarks[j] + s.tShift[j]) >= (x = s.eMarks[j])) &&
(45 === (_ = s.src.charCodeAt(w)) || 61 === _) &&
((w = s.skipChars(w, _)),
!((w = s.skipSpaces(w)) < x) &&
((w = s.bMarks[i] + s.tShift[i]),
(s.line = j + 1),
s.tokens.push({
type: "heading_open",
hLevel: 61 === _ ? 1 : 2,
lines: [i, s.line],
level: s.level
}),
s.tokens.push({
type: "inline",
content: s.src.slice(w, s.eMarks[i]).trim(),
level: s.level + 1,
lines: [i, s.line - 1],
children: []
}),
s.tokens.push({
type: "heading_close",
hLevel: 61 === _ ? 1 : 2,
level: s.level
}),
!0))
);
}
],
@ -72276,31 +72273,31 @@
return (
!(P + 2 >= j) &&
94 === s.src.charCodeAt(P) &&
91 === s.src.charCodeAt(P + 1) &&
!(s.level >= s.options.maxNesting) &&
((u = P + 2),
!((_ = parseLinkLabel(s, P + 1)) < 0) &&
(i ||
(s.env.footnotes || (s.env.footnotes = {}),
s.env.footnotes.list || (s.env.footnotes.list = []),
(w = s.env.footnotes.list.length),
(s.pos = u),
(s.posMax = _),
s.push({
type: "footnote_ref",
id: w,
level: s.level
}),
s.linkLevel++,
(x = s.tokens.length),
s.parser.tokenize(s),
(s.env.footnotes.list[w] = {
tokens: s.tokens.splice(x)
}),
s.linkLevel--),
(s.pos = _ + 1),
(s.posMax = j),
!0))
91 === s.src.charCodeAt(P + 1) &&
!(s.level >= s.options.maxNesting) &&
((u = P + 2),
!((_ = parseLinkLabel(s, P + 1)) < 0) &&
(i ||
(s.env.footnotes || (s.env.footnotes = {}),
s.env.footnotes.list || (s.env.footnotes.list = []),
(w = s.env.footnotes.list.length),
(s.pos = u),
(s.posMax = _),
s.push({
type: "footnote_ref",
id: w,
level: s.level
}),
s.linkLevel++,
(x = s.tokens.length),
s.parser.tokenize(s),
(s.env.footnotes.list[w] = {
tokens: s.tokens.splice(x)
}),
s.linkLevel--),
(s.pos = _ + 1),
(s.posMax = j),
!0))
);
}
],
@ -72326,27 +72323,27 @@
return (
_ !== P + 2 &&
!(_ >= j) &&
(_++,
(u = s.src.slice(P + 2, _ - 1)),
void 0 !== s.env.footnotes.refs[":" + u] &&
(i ||
(s.env.footnotes.list || (s.env.footnotes.list = []),
s.env.footnotes.refs[":" + u] < 0
? ((w = s.env.footnotes.list.length),
(s.env.footnotes.list[w] = { label: u, count: 0 }),
(s.env.footnotes.refs[":" + u] = w))
: (w = s.env.footnotes.refs[":" + u]),
(x = s.env.footnotes.list[w].count),
s.env.footnotes.list[w].count++,
s.push({
type: "footnote_ref",
id: w,
subId: x,
level: s.level
})),
(s.pos = _),
(s.posMax = j),
!0))
(_++,
(u = s.src.slice(P + 2, _ - 1)),
void 0 !== s.env.footnotes.refs[":" + u] &&
(i ||
(s.env.footnotes.list || (s.env.footnotes.list = []),
s.env.footnotes.refs[":" + u] < 0
? ((w = s.env.footnotes.list.length),
(s.env.footnotes.list[w] = { label: u, count: 0 }),
(s.env.footnotes.refs[":" + u] = w))
: (w = s.env.footnotes.refs[":" + u]),
(x = s.env.footnotes.list[w].count),
s.env.footnotes.list[w].count++,
s.push({
type: "footnote_ref",
id: w,
subId: x,
level: s.level
})),
(s.pos = _),
(s.posMax = j),
!0))
);
}
],
@ -72362,41 +72359,41 @@
return (
60 === s.src.charCodeAt(P) &&
!((u = s.src.slice(P)).indexOf(">") < 0) &&
((_ = u.match(NI))
? !(II.indexOf(_[1].toLowerCase()) < 0) &&
((j = normalizeLink((x = _[0].slice(1, -1)))),
!!s.parser.validateLink(x) &&
(i ||
(s.push({
type: "link_open",
href: j,
level: s.level
}),
s.push({
type: "text",
content: x,
level: s.level + 1
}),
s.push({ type: "link_close", level: s.level })),
(s.pos += _[0].length),
!0))
: !!(w = u.match(PI)) &&
((j = normalizeLink("mailto:" + (x = w[0].slice(1, -1)))),
!!s.parser.validateLink(j) &&
(i ||
(s.push({
type: "link_open",
href: j,
level: s.level
}),
s.push({
type: "text",
content: x,
level: s.level + 1
}),
s.push({ type: "link_close", level: s.level })),
(s.pos += w[0].length),
!0)))
((_ = u.match(NI))
? !(II.indexOf(_[1].toLowerCase()) < 0) &&
((j = normalizeLink((x = _[0].slice(1, -1)))),
!!s.parser.validateLink(x) &&
(i ||
(s.push({
type: "link_open",
href: j,
level: s.level
}),
s.push({
type: "text",
content: x,
level: s.level + 1
}),
s.push({ type: "link_close", level: s.level })),
(s.pos += _[0].length),
!0))
: !!(w = u.match(PI)) &&
((j = normalizeLink("mailto:" + (x = w[0].slice(1, -1)))),
!!s.parser.validateLink(j) &&
(i ||
(s.push({
type: "link_open",
href: j,
level: s.level
}),
s.push({
type: "text",
content: x,
level: s.level + 1
}),
s.push({ type: "link_close", level: s.level })),
(s.pos += w[0].length),
!0)))
);
}
],
@ -72420,15 +72417,15 @@
return i >= 97 && i <= 122;
})(u)
) &&
!!(_ = s.src.slice(x).match(DI)) &&
(i ||
s.push({
type: "htmltag",
content: s.src.slice(x, x + _[0].length),
level: s.level
}),
(s.pos += _[0].length),
!0))
!!(_ = s.src.slice(x).match(DI)) &&
(i ||
s.push({
type: "htmltag",
content: s.src.slice(x, x + _[0].length),
level: s.level
}),
(s.pos += _[0].length),
!0))
);
}
],
@ -73554,7 +73551,7 @@
return (
!(!s || !i) &&
!this.hasFullProtocolRegex.test(i) &&
!this.hasWordCharAfterProtocolRegex.test(s)
!this.hasWordCharAfterProtocolRegex.test(s)
);
}),
(UrlMatchValidator.hasFullProtocolRegex = /^[A-Za-z][-.+A-Za-z0-9]*:\/\//),
@ -75977,19 +75974,17 @@
? He.createElement(
"select",
{ "data-variable": s, onChange: $ },
u
.get("enum")
.map(u =>
He.createElement(
"option",
{
selected: u === w(i, s),
key: u,
value: u
},
u
)
u.get("enum").map(u =>
He.createElement(
"option",
{
selected: u === w(i, s),
key: u,
value: u
},
u
)
)
)
: He.createElement("input", {
type: "text",
@ -80766,7 +80761,8 @@
const { examples: i, example: u, default: _ } = s;
return (
!!(Array.isArray(i) && i.length >= 1) ||
void 0 !== _ || void 0 !== u
void 0 !== _ ||
void 0 !== u
);
},
extractExample = s => {

View File

@ -2323,7 +2323,8 @@ var ve = {
return (
void 0 !== this._readableState &&
void 0 !== this._writableState &&
this._readableState.destroyed && this._writableState.destroyed
this._readableState.destroyed &&
this._writableState.destroyed
);
},
set: function set(e) {
@ -3336,7 +3337,8 @@ var ve = {
return (
!!c.call(this, e) ||
(this === Writable &&
e && e._writableState instanceof WritableState)
e &&
e._writableState instanceof WritableState)
);
}
}))
@ -10833,20 +10835,18 @@ var we = {};
Ke.default.createElement(
"div",
{ className: "modal-ux-content" },
s
.valueSeq()
.map((s, i) =>
Ke.default.createElement(l, {
key: i,
AST: o,
definitions: s,
getComponent: r,
errSelectors: n,
authSelectors: e,
authActions: t,
specSelectors: a
})
)
s.valueSeq().map((s, i) =>
Ke.default.createElement(l, {
key: i,
AST: o,
definitions: s,
getComponent: r,
errSelectors: n,
authSelectors: e,
authActions: t,
specSelectors: a
})
)
)
)
)
@ -13194,15 +13194,13 @@ var we = {};
Ke.default.createElement(
"tbody",
null,
e
.entrySeq()
.map(([e, t]) =>
Ke.default.createElement(r, {
key: `${e}-${t}`,
xKey: e,
xVal: t
})
)
e.entrySeq().map(([e, t]) =>
Ke.default.createElement(r, {
key: `${e}-${t}`,
xKey: e,
xVal: t
})
)
)
)
)
@ -13627,15 +13625,13 @@ var we = {};
Ke.default.createElement(x, { source: n.get("description") })
),
g && y.size
? y
.entrySeq()
.map(([e, t]) =>
Ke.default.createElement(v, {
key: `${e}-${t}`,
xKey: e,
xVal: t
})
)
? y.entrySeq().map(([e, t]) =>
Ke.default.createElement(v, {
key: `${e}-${t}`,
xKey: e,
xVal: t
})
)
: null,
h && n.get("content")
? Ke.default.createElement(
@ -16688,16 +16684,14 @@ var we = {};
Ke.default.createElement("span", { className: "brace-close" }, "}")
),
w.size
? w
.entrySeq()
.map(([e, t]) =>
Ke.default.createElement(R, {
key: `${e}-${t}`,
propKey: e,
propVal: t,
propClass: "property"
})
)
? w.entrySeq().map(([e, t]) =>
Ke.default.createElement(R, {
key: `${e}-${t}`,
propKey: e,
propVal: t,
propClass: "property"
})
)
: null
);
}
@ -16748,16 +16742,14 @@ var we = {};
{ title: _, expanded: n <= a, collapsedContent: "[...]" },
"[",
d.size
? d
.entrySeq()
.map(([e, t]) =>
Ke.default.createElement(y, {
key: `${e}-${t}`,
propKey: e,
propVal: t,
propClass: "property"
})
)
? d.entrySeq().map(([e, t]) =>
Ke.default.createElement(y, {
key: `${e}-${t}`,
propKey: e,
propVal: t,
propClass: "property"
})
)
: null,
i
? Ke.default.createElement(f, { source: i })
@ -16874,28 +16866,24 @@ var we = {};
")"
),
h.size
? h
.entrySeq()
.map(([e, t]) =>
Ke.default.createElement(v, {
key: `${e}-${t}`,
propKey: e,
propVal: t,
propClass: ka
})
)
? h.entrySeq().map(([e, t]) =>
Ke.default.createElement(v, {
key: `${e}-${t}`,
propKey: e,
propVal: t,
propClass: ka
})
)
: null,
l && f.size
? f
.entrySeq()
.map(([e, t]) =>
Ke.default.createElement(v, {
key: `${e}-${t}`,
propKey: e,
propVal: t,
propClass: ka
})
)
? f.entrySeq().map(([e, t]) =>
Ke.default.createElement(v, {
key: `${e}-${t}`,
propKey: e,
propVal: t,
propClass: ka
})
)
: null,
m ? Ke.default.createElement(S, { source: m }) : null,
g &&
@ -18263,15 +18251,13 @@ var we = {};
")"
),
x && c.size
? c
.entrySeq()
.map(([e, r]) =>
Ke.default.createElement(t, {
key: `${e}-${r}`,
xKey: e,
xVal: r
})
)
? c.entrySeq().map(([e, r]) =>
Ke.default.createElement(t, {
key: `${e}-${r}`,
xKey: e,
xVal: r
})
)
: null
),
Ke.default.createElement(
@ -20384,10 +20370,12 @@ var we = {};
Ke.default.createElement(
"ul",
{
className: (0,
ha.default)("json-schema-2020-12-keyword__children", {
"json-schema-2020-12-keyword__children--collapsed": !c
})
className: (0, ha.default)(
"json-schema-2020-12-keyword__children",
{
"json-schema-2020-12-keyword__children--collapsed": !c
}
)
},
c &&
Ke.default.createElement(
@ -20577,10 +20565,12 @@ var we = {};
Ke.default.createElement(
"ul",
{
className: (0,
ha.default)("json-schema-2020-12-keyword__children", {
"json-schema-2020-12-keyword__children--collapsed": !c
})
className: (0, ha.default)(
"json-schema-2020-12-keyword__children",
{
"json-schema-2020-12-keyword__children--collapsed": !c
}
)
},
c &&
Ke.default.createElement(
@ -20661,10 +20651,12 @@ var we = {};
Ke.default.createElement(
"ul",
{
className: (0,
ha.default)("json-schema-2020-12-keyword__children", {
"json-schema-2020-12-keyword__children--collapsed": !c
})
className: (0, ha.default)(
"json-schema-2020-12-keyword__children",
{
"json-schema-2020-12-keyword__children--collapsed": !c
}
)
},
c &&
Ke.default.createElement(
@ -21224,10 +21216,12 @@ var we = {};
"li",
{
key: e,
className: (0,
ha.default)("json-schema-2020-12-$vocabulary-uri", {
"json-schema-2020-12-$vocabulary-uri--disabled": !t
})
className: (0, ha.default)(
"json-schema-2020-12-$vocabulary-uri",
{
"json-schema-2020-12-$vocabulary-uri--disabled": !t
}
)
},
Ke.default.createElement(
"span",
@ -21422,10 +21416,12 @@ var we = {};
Ke.default.createElement(
"ul",
{
className: (0,
ha.default)("json-schema-2020-12-keyword__children", {
"json-schema-2020-12-keyword__children--collapsed": !n
})
className: (0, ha.default)(
"json-schema-2020-12-keyword__children",
{
"json-schema-2020-12-keyword__children--collapsed": !n
}
)
},
n &&
Ke.default.createElement(
@ -21512,10 +21508,12 @@ var we = {};
Ke.default.createElement(
"ul",
{
className: (0,
ha.default)("json-schema-2020-12-keyword__children", {
"json-schema-2020-12-keyword__children--collapsed": !a
})
className: (0, ha.default)(
"json-schema-2020-12-keyword__children",
{
"json-schema-2020-12-keyword__children--collapsed": !a
}
)
},
a &&
Ke.default.createElement(
@ -21583,10 +21581,12 @@ var we = {};
Ke.default.createElement(
"ul",
{
className: (0,
ha.default)("json-schema-2020-12-keyword__children", {
"json-schema-2020-12-keyword__children--collapsed": !a
})
className: (0, ha.default)(
"json-schema-2020-12-keyword__children",
{
"json-schema-2020-12-keyword__children--collapsed": !a
}
)
},
a &&
Ke.default.createElement(
@ -21654,10 +21654,12 @@ var we = {};
Ke.default.createElement(
"ul",
{
className: (0,
ha.default)("json-schema-2020-12-keyword__children", {
"json-schema-2020-12-keyword__children--collapsed": !a
})
className: (0, ha.default)(
"json-schema-2020-12-keyword__children",
{
"json-schema-2020-12-keyword__children--collapsed": !a
}
)
},
a &&
Ke.default.createElement(
@ -21813,10 +21815,12 @@ var we = {};
Ke.default.createElement(
"ul",
{
className: (0,
ha.default)("json-schema-2020-12-keyword__children", {
"json-schema-2020-12-keyword__children--collapsed": !n
})
className: (0, ha.default)(
"json-schema-2020-12-keyword__children",
{
"json-schema-2020-12-keyword__children--collapsed": !n
}
)
},
n &&
Ke.default.createElement(
@ -21877,10 +21881,12 @@ var we = {};
Ke.default.createElement(
"ul",
{
className: (0,
ha.default)("json-schema-2020-12-keyword__children", {
"json-schema-2020-12-keyword__children--collapsed": !a
})
className: (0, ha.default)(
"json-schema-2020-12-keyword__children",
{
"json-schema-2020-12-keyword__children--collapsed": !a
}
)
},
a &&
Ke.default.createElement(

View File

@ -4587,8 +4587,9 @@
return (
"function" == typeof _ &&
"function" == typeof Symbol &&
"symbol" == typeof _("foo") &&
"symbol" == typeof Symbol("bar") && w()
"symbol" == typeof _("foo") &&
"symbol" == typeof Symbol("bar") &&
w()
);
};
},
@ -13205,7 +13206,9 @@
null != s &&
!w(s)
) ||
j.test(s) || !x.test(s) || (null != i && s in Object(i))
j.test(s) ||
!x.test(s) ||
(null != i && s in Object(i))
);
};
},
@ -19958,7 +19961,8 @@
var i = s.memoizedState;
if (
(null === i &&
null !== (s = s.alternate) && (i = s.memoizedState),
null !== (s = s.alternate) &&
(i = s.memoizedState),
null !== i)
)
return i.dehydrated;
@ -21407,7 +21411,8 @@
null !== ae &&
((Z = ae),
null !== X &&
null != (ae = Kb(ee, X)) && U.push(tf(ee, ae, Z))),
null != (ae = Kb(ee, X)) &&
U.push(tf(ee, ae, Z))),
Y)
)
break;
@ -21603,9 +21608,9 @@
}
})(s, u)) &&
0 < (_ = oe(_, "onBeforeInput")).length &&
((w = new fr("onBeforeInput", "beforeinput", null, u, w)),
j.push({ event: w, listeners: _ }),
(w.data = ce));
((w = new fr("onBeforeInput", "beforeinput", null, u, w)),
j.push({ event: w, listeners: _ }),
(w.data = ce));
}
se(j, i);
});
@ -22232,8 +22237,8 @@
var U = s.alternate;
null !== U &&
(P = (U = U.updateQueue).lastBaseUpdate) !== j &&
(null === P ? (U.firstBaseUpdate = $) : (P.next = $),
(U.lastBaseUpdate = B));
(null === P ? (U.firstBaseUpdate = $) : (P.next = $),
(U.lastBaseUpdate = B));
}
if (null !== x) {
var Y = w.baseState;
@ -22372,7 +22377,8 @@
? s.shouldComponentUpdate(_, x, j)
: !i.prototype ||
!i.prototype.isPureReactComponent ||
!Ie(u, _) || !Ie(w, x);
!Ie(u, _) ||
!Ie(w, x);
}
function ph(s, i, u) {
var _ = !1,
@ -24842,11 +24848,11 @@
(s.sibling = null),
5 === s.tag &&
null !== (i = s.stateNode) &&
(delete i[gn],
delete i[yn],
delete i[vn],
delete i[_n],
delete i[wn]),
(delete i[gn],
delete i[yn],
delete i[vn],
delete i[_n],
delete i[wn]),
(s.stateNode = null),
(s.return = null),
(s.dependencies = null),
@ -24957,7 +24963,8 @@
case 15:
if (
!Po &&
null !== (_ = u.updateQueue) && null !== (_ = _.lastEffect)
null !== (_ = u.updateQueue) &&
null !== (_ = _.lastEffect)
) {
w = _ = _.next;
do {
@ -25693,7 +25700,8 @@
return !0;
})(w) &&
(2 === (i = Jk(s, _)) &&
0 !== (x = xc(s)) && ((_ = x), (i = Ok(s, x))),
0 !== (x = xc(s)) &&
((_ = x), (i = Ok(s, x))),
1 === i))
)
throw ((u = Go), Lk(s, 0), Dk(s, _), Ek(s, yt()), u);
@ -28109,7 +28117,8 @@
return (
void 0 !== this._readableState &&
void 0 !== this._writableState &&
this._readableState.destroyed && this._writableState.destroyed
this._readableState.destroyed &&
this._writableState.destroyed
);
},
set: function set(s) {
@ -29135,7 +29144,8 @@
return (
!!$.call(this, s) ||
(this === Writable &&
s && s._writableState instanceof WritableState)
s &&
s._writableState instanceof WritableState)
);
}
}))
@ -33559,7 +33569,8 @@
j = s;
if (
"object" == typeof s &&
(j = s[(_ = Object.keys(s)[0])]) && j._elem
(j = s[(_ = Object.keys(s)[0])]) &&
j._elem
)
return (
(j._elem.name = _),
@ -46143,10 +46154,11 @@
!!Jl(s) ||
(!!s &&
"object" == typeof s &&
!_isString(s) &&
(0 === s.length ||
(s.length > 0 &&
s.hasOwnProperty(0) && s.hasOwnProperty(s.length - 1))))
!_isString(s) &&
(0 === s.length ||
(s.length > 0 &&
s.hasOwnProperty(0) &&
s.hasOwnProperty(s.length - 1))))
);
});
var sc = "undefined" != typeof Symbol ? Symbol.iterator : "@@iterator";
@ -47695,10 +47707,8 @@
? !(!s || "object" != typeof s || "string" != typeof s.uri)
: ("undefined" != typeof File && s instanceof File) ||
("undefined" != typeof Blob && s instanceof Blob) ||
!!ArrayBuffer.isView(s) ||
(null !== s &&
"object" == typeof s &&
"function" == typeof s.pipe)
!!ArrayBuffer.isView(s) ||
(null !== s && "object" == typeof s && "function" == typeof s.pipe)
);
}
function isArrayOfFile(s, i) {
@ -48197,7 +48207,8 @@
"object" == typeof i &&
null !== i &&
"primitive" in i &&
"function" == typeof i.primitive && i.primitive() === s,
"function" == typeof i.primitive &&
i.primitive() === s,
hasClass = (s, i) =>
"object" == typeof i &&
null !== i &&
@ -57589,12 +57600,12 @@
const parameterEquals = (i, u) =>
!!s.isParameterElement(i) &&
!!s.isParameterElement(u) &&
!!s.isStringElement(i.name) &&
!!s.isStringElement(i.in) &&
!!s.isStringElement(u.name) &&
!!s.isStringElement(u.in) &&
serializers_value(i.name) === serializers_value(u.name) &&
serializers_value(i.in) === serializers_value(u.in),
!!s.isStringElement(i.name) &&
!!s.isStringElement(i.in) &&
!!s.isStringElement(u.name) &&
!!s.isStringElement(u.in) &&
serializers_value(i.name) === serializers_value(u.name) &&
serializers_value(i.in) === serializers_value(u.in),
i = [];
return {
visitor: {
@ -61244,20 +61255,18 @@
He.createElement(
"div",
{ className: "modal-ux-content" },
j
.valueSeq()
.map((j, B) =>
He.createElement(P, {
key: B,
AST: x,
definitions: j,
getComponent: u,
errSelectors: _,
authSelectors: s,
authActions: i,
specSelectors: w
})
)
j.valueSeq().map((j, B) =>
He.createElement(P, {
key: B,
AST: x,
definitions: j,
getComponent: u,
errSelectors: _,
authSelectors: s,
authActions: i,
specSelectors: w
})
)
)
)
)
@ -64919,26 +64928,22 @@
")"
),
Z && et.size
? et
.entrySeq()
.map(([s, i]) =>
He.createElement(de, {
key: `${s}-${i}`,
xKey: s,
xVal: i
})
)
? et.entrySeq().map(([s, i]) =>
He.createElement(de, {
key: `${s}-${i}`,
xKey: s,
xVal: i
})
)
: null,
X && tt.size
? tt
.entrySeq()
.map(([s, i]) =>
He.createElement(de, {
key: `${s}-${i}`,
xKey: s,
xVal: i
})
)
? tt.entrySeq().map(([s, i]) =>
He.createElement(de, {
key: `${s}-${i}`,
xKey: s,
xVal: i
})
)
: null
),
He.createElement(
@ -67252,16 +67257,14 @@
He.createElement("span", { className: "brace-close" }, "}")
),
ye.size
? ye
.entrySeq()
.map(([s, i]) =>
He.createElement(Re, {
key: `${s}-${i}`,
propKey: s,
propVal: i,
propClass: "property"
})
)
? ye.entrySeq().map(([s, i]) =>
He.createElement(Re, {
key: `${s}-${i}`,
propKey: s,
propVal: i,
propClass: "property"
})
)
: null
);
}
@ -67430,28 +67433,24 @@
")"
),
ae.size
? ae
.entrySeq()
.map(([s, i]) =>
He.createElement(de, {
key: `${s}-${i}`,
propKey: s,
propVal: i,
propClass: eI
})
)
? ae.entrySeq().map(([s, i]) =>
He.createElement(de, {
key: `${s}-${i}`,
propKey: s,
propVal: i,
propClass: eI
})
)
: null,
P && ee.size
? ee
.entrySeq()
.map(([s, i]) =>
He.createElement(de, {
key: `${s}-${i}`,
propKey: s,
propVal: i,
propClass: eI
})
)
? ee.entrySeq().map(([s, i]) =>
He.createElement(de, {
key: `${s}-${i}`,
propKey: s,
propVal: i,
propClass: eI
})
)
: null,
Z ? He.createElement(ce, { source: Z }) : null,
ie &&
@ -67779,12 +67778,13 @@
return (
!(s >= 55296 && s <= 57343) &&
!(s >= 64976 && s <= 65007) &&
65535 != (65535 & s) &&
65534 != (65535 & s) &&
!(s >= 0 && s <= 8) &&
11 !== s &&
!(s >= 14 && s <= 31) &&
!(s >= 127 && s <= 159) && !(s > 1114111)
65535 != (65535 & s) &&
65534 != (65535 & s) &&
!(s >= 0 && s <= 8) &&
11 !== s &&
!(s >= 14 && s <= 31) &&
!(s >= 127 && s <= 159) &&
!(s > 1114111)
);
}
function fromCodePoint(s) {
@ -69288,36 +69288,36 @@
return (
P !== $ + 2 &&
!(P + 1 >= U || 58 !== s.src.charCodeAt(++P)) &&
(_ ||
(P++,
s.env.footnotes || (s.env.footnotes = {}),
s.env.footnotes.refs || (s.env.footnotes.refs = {}),
(B = s.src.slice($ + 2, P - 2)),
(s.env.footnotes.refs[":" + B] = -1),
s.tokens.push({
type: "footnote_reference_open",
label: B,
level: s.level++
}),
(w = s.bMarks[i]),
(x = s.tShift[i]),
(j = s.parentType),
(s.tShift[i] = s.skipSpaces(P) - P),
(s.bMarks[i] = P),
(s.blkIndent += 4),
(s.parentType = "footnote"),
s.tShift[i] < s.blkIndent &&
((s.tShift[i] += s.blkIndent), (s.bMarks[i] -= s.blkIndent)),
s.parser.tokenize(s, i, u, !0),
(s.parentType = j),
(s.blkIndent -= 4),
(s.tShift[i] = x),
(s.bMarks[i] = w),
s.tokens.push({
type: "footnote_reference_close",
level: --s.level
})),
!0)
(_ ||
(P++,
s.env.footnotes || (s.env.footnotes = {}),
s.env.footnotes.refs || (s.env.footnotes.refs = {}),
(B = s.src.slice($ + 2, P - 2)),
(s.env.footnotes.refs[":" + B] = -1),
s.tokens.push({
type: "footnote_reference_open",
label: B,
level: s.level++
}),
(w = s.bMarks[i]),
(x = s.tShift[i]),
(j = s.parentType),
(s.tShift[i] = s.skipSpaces(P) - P),
(s.bMarks[i] = P),
(s.blkIndent += 4),
(s.parentType = "footnote"),
s.tShift[i] < s.blkIndent &&
((s.tShift[i] += s.blkIndent), (s.bMarks[i] -= s.blkIndent)),
s.parser.tokenize(s, i, u, !0),
(s.parentType = j),
(s.blkIndent -= 4),
(s.tShift[i] = x),
(s.bMarks[i] = w),
s.tokens.push({
type: "footnote_reference_close",
level: --s.level
})),
!0)
);
},
["paragraph"]
@ -69376,32 +69376,32 @@
return (
!(j >= u) &&
!(s.tShift[j] < s.blkIndent) &&
!(s.tShift[j] - s.blkIndent > 3) &&
!((w = s.bMarks[j] + s.tShift[j]) >= (x = s.eMarks[j])) &&
(45 === (_ = s.src.charCodeAt(w)) || 61 === _) &&
((w = s.skipChars(w, _)),
!((w = s.skipSpaces(w)) < x) &&
((w = s.bMarks[i] + s.tShift[i]),
(s.line = j + 1),
s.tokens.push({
type: "heading_open",
hLevel: 61 === _ ? 1 : 2,
lines: [i, s.line],
level: s.level
}),
s.tokens.push({
type: "inline",
content: s.src.slice(w, s.eMarks[i]).trim(),
level: s.level + 1,
lines: [i, s.line - 1],
children: []
}),
s.tokens.push({
type: "heading_close",
hLevel: 61 === _ ? 1 : 2,
level: s.level
}),
!0))
!(s.tShift[j] - s.blkIndent > 3) &&
!((w = s.bMarks[j] + s.tShift[j]) >= (x = s.eMarks[j])) &&
(45 === (_ = s.src.charCodeAt(w)) || 61 === _) &&
((w = s.skipChars(w, _)),
!((w = s.skipSpaces(w)) < x) &&
((w = s.bMarks[i] + s.tShift[i]),
(s.line = j + 1),
s.tokens.push({
type: "heading_open",
hLevel: 61 === _ ? 1 : 2,
lines: [i, s.line],
level: s.level
}),
s.tokens.push({
type: "inline",
content: s.src.slice(w, s.eMarks[i]).trim(),
level: s.level + 1,
lines: [i, s.line - 1],
children: []
}),
s.tokens.push({
type: "heading_close",
hLevel: 61 === _ ? 1 : 2,
level: s.level
}),
!0))
);
}
],
@ -70516,27 +70516,27 @@
return (
!(P + 2 >= j) &&
94 === s.src.charCodeAt(P) &&
91 === s.src.charCodeAt(P + 1) &&
!(s.level >= s.options.maxNesting) &&
((u = P + 2),
!((_ = parseLinkLabel(s, P + 1)) < 0) &&
(i ||
(s.env.footnotes || (s.env.footnotes = {}),
s.env.footnotes.list || (s.env.footnotes.list = []),
(w = s.env.footnotes.list.length),
(s.pos = u),
(s.posMax = _),
s.push({ type: "footnote_ref", id: w, level: s.level }),
s.linkLevel++,
(x = s.tokens.length),
s.parser.tokenize(s),
(s.env.footnotes.list[w] = {
tokens: s.tokens.splice(x)
}),
s.linkLevel--),
(s.pos = _ + 1),
(s.posMax = j),
!0))
91 === s.src.charCodeAt(P + 1) &&
!(s.level >= s.options.maxNesting) &&
((u = P + 2),
!((_ = parseLinkLabel(s, P + 1)) < 0) &&
(i ||
(s.env.footnotes || (s.env.footnotes = {}),
s.env.footnotes.list || (s.env.footnotes.list = []),
(w = s.env.footnotes.list.length),
(s.pos = u),
(s.posMax = _),
s.push({ type: "footnote_ref", id: w, level: s.level }),
s.linkLevel++,
(x = s.tokens.length),
s.parser.tokenize(s),
(s.env.footnotes.list[w] = {
tokens: s.tokens.splice(x)
}),
s.linkLevel--),
(s.pos = _ + 1),
(s.posMax = j),
!0))
);
}
],
@ -70562,27 +70562,27 @@
return (
_ !== P + 2 &&
!(_ >= j) &&
(_++,
(u = s.src.slice(P + 2, _ - 1)),
void 0 !== s.env.footnotes.refs[":" + u] &&
(i ||
(s.env.footnotes.list || (s.env.footnotes.list = []),
s.env.footnotes.refs[":" + u] < 0
? ((w = s.env.footnotes.list.length),
(s.env.footnotes.list[w] = { label: u, count: 0 }),
(s.env.footnotes.refs[":" + u] = w))
: (w = s.env.footnotes.refs[":" + u]),
(x = s.env.footnotes.list[w].count),
s.env.footnotes.list[w].count++,
s.push({
type: "footnote_ref",
id: w,
subId: x,
level: s.level
})),
(s.pos = _),
(s.posMax = j),
!0))
(_++,
(u = s.src.slice(P + 2, _ - 1)),
void 0 !== s.env.footnotes.refs[":" + u] &&
(i ||
(s.env.footnotes.list || (s.env.footnotes.list = []),
s.env.footnotes.refs[":" + u] < 0
? ((w = s.env.footnotes.list.length),
(s.env.footnotes.list[w] = { label: u, count: 0 }),
(s.env.footnotes.refs[":" + u] = w))
: (w = s.env.footnotes.refs[":" + u]),
(x = s.env.footnotes.list[w].count),
s.env.footnotes.list[w].count++,
s.push({
type: "footnote_ref",
id: w,
subId: x,
level: s.level
})),
(s.pos = _),
(s.posMax = j),
!0))
);
}
],
@ -70598,25 +70598,25 @@
return (
60 === s.src.charCodeAt(P) &&
!((u = s.src.slice(P)).indexOf(">") < 0) &&
((_ = u.match(NI))
? !(II.indexOf(_[1].toLowerCase()) < 0) &&
((j = normalizeLink((x = _[0].slice(1, -1)))),
!!s.parser.validateLink(x) &&
(i ||
(s.push({ type: "link_open", href: j, level: s.level }),
s.push({ type: "text", content: x, level: s.level + 1 }),
s.push({ type: "link_close", level: s.level })),
(s.pos += _[0].length),
!0))
: !!(w = u.match(PI)) &&
((j = normalizeLink("mailto:" + (x = w[0].slice(1, -1)))),
!!s.parser.validateLink(j) &&
(i ||
(s.push({ type: "link_open", href: j, level: s.level }),
s.push({ type: "text", content: x, level: s.level + 1 }),
s.push({ type: "link_close", level: s.level })),
(s.pos += w[0].length),
!0)))
((_ = u.match(NI))
? !(II.indexOf(_[1].toLowerCase()) < 0) &&
((j = normalizeLink((x = _[0].slice(1, -1)))),
!!s.parser.validateLink(x) &&
(i ||
(s.push({ type: "link_open", href: j, level: s.level }),
s.push({ type: "text", content: x, level: s.level + 1 }),
s.push({ type: "link_close", level: s.level })),
(s.pos += _[0].length),
!0))
: !!(w = u.match(PI)) &&
((j = normalizeLink("mailto:" + (x = w[0].slice(1, -1)))),
!!s.parser.validateLink(j) &&
(i ||
(s.push({ type: "link_open", href: j, level: s.level }),
s.push({ type: "text", content: x, level: s.level + 1 }),
s.push({ type: "link_close", level: s.level })),
(s.pos += w[0].length),
!0)))
);
}
],
@ -70640,15 +70640,15 @@
return i >= 97 && i <= 122;
})(u)
) &&
!!(_ = s.src.slice(x).match(DI)) &&
(i ||
s.push({
type: "htmltag",
content: s.src.slice(x, x + _[0].length),
level: s.level
}),
(s.pos += _[0].length),
!0))
!!(_ = s.src.slice(x).match(DI)) &&
(i ||
s.push({
type: "htmltag",
content: s.src.slice(x, x + _[0].length),
level: s.level
}),
(s.pos += _[0].length),
!0))
);
}
],
@ -71740,7 +71740,7 @@
return (
!(!s || !i) &&
!this.hasFullProtocolRegex.test(i) &&
!this.hasWordCharAfterProtocolRegex.test(s)
!this.hasWordCharAfterProtocolRegex.test(s)
);
}),
(UrlMatchValidator.hasFullProtocolRegex = /^[A-Za-z][-.+A-Za-z0-9]*:\/\//),
@ -74095,19 +74095,17 @@
? He.createElement(
"select",
{ "data-variable": s, onChange: $ },
u
.get("enum")
.map(u =>
He.createElement(
"option",
{
selected: u === w(i, s),
key: u,
value: u
},
u
)
u.get("enum").map(u =>
He.createElement(
"option",
{
selected: u === w(i, s),
key: u,
value: u
},
u
)
)
)
: He.createElement("input", {
type: "text",

View File

@ -6859,7 +6859,9 @@
null != e &&
!i(e)
) ||
a.test(e) || !o.test(e) || (null != t && e in Object(t))
a.test(e) ||
!o.test(e) ||
(null != t && e in Object(t))
);
};
},

View File

@ -4819,20 +4819,18 @@
k().createElement(
"div",
{ className: "modal-ux-content" },
o
.valueSeq()
.map((o, c) =>
k().createElement(l, {
key: c,
AST: s,
definitions: o,
getComponent: r,
errSelectors: a,
authSelectors: e,
authActions: t,
specSelectors: n
})
)
o.valueSeq().map((o, c) =>
k().createElement(l, {
key: c,
AST: s,
definitions: o,
getComponent: r,
errSelectors: a,
authSelectors: e,
authActions: t,
specSelectors: n
})
)
)
)
)
@ -7258,15 +7256,13 @@
k().createElement(
"tbody",
null,
e
.entrySeq()
.map(([e, t]) =>
k().createElement(r, {
key: `${e}-${t}`,
xKey: e,
xVal: t
})
)
e.entrySeq().map(([e, t]) =>
k().createElement(r, {
key: `${e}-${t}`,
xKey: e,
xVal: t
})
)
)
)
)
@ -7698,15 +7694,13 @@
k().createElement(C, { source: a.get("description") })
),
y && f.size
? f
.entrySeq()
.map(([e, t]) =>
k().createElement(_, {
key: `${e}-${t}`,
xKey: e,
xVal: t
})
)
? f.entrySeq().map(([e, t]) =>
k().createElement(_, {
key: `${e}-${t}`,
xKey: e,
xVal: t
})
)
: null,
g && a.get("content")
? k().createElement(
@ -10816,16 +10810,14 @@
k().createElement("span", { className: "brace-close" }, "}")
),
w.size
? w
.entrySeq()
.map(([e, t]) =>
k().createElement(j, {
key: `${e}-${t}`,
propKey: e,
propVal: t,
propClass: "property"
})
)
? w.entrySeq().map(([e, t]) =>
k().createElement(j, {
key: `${e}-${t}`,
propKey: e,
propVal: t,
propClass: "property"
})
)
: null
);
}
@ -10882,16 +10874,14 @@
{ title: E, expanded: a <= n, collapsedContent: "[...]" },
"[",
m.size
? m
.entrySeq()
.map(([e, t]) =>
k().createElement(f, {
key: `${e}-${t}`,
propKey: e,
propVal: t,
propClass: "property"
})
)
? m.entrySeq().map(([e, t]) =>
k().createElement(f, {
key: `${e}-${t}`,
propKey: e,
propVal: t,
propClass: "property"
})
)
: null,
c
? k().createElement(h, { source: c })
@ -11008,28 +10998,24 @@
")"
),
g.size
? g
.entrySeq()
.map(([e, t]) =>
k().createElement(_, {
key: `${e}-${t}`,
propKey: e,
propVal: t,
propClass: ln
})
)
? g.entrySeq().map(([e, t]) =>
k().createElement(_, {
key: `${e}-${t}`,
propKey: e,
propVal: t,
propClass: ln
})
)
: null,
l && h.size
? h
.entrySeq()
.map(([e, t]) =>
k().createElement(_, {
key: `${e}-${t}`,
propKey: e,
propVal: t,
propClass: ln
})
)
? h.entrySeq().map(([e, t]) =>
k().createElement(_, {
key: `${e}-${t}`,
propKey: e,
propVal: t,
propClass: ln
})
)
: null,
d ? k().createElement(S, { source: d }) : null,
y &&
@ -12452,15 +12438,13 @@
")"
),
C && i.size
? i
.entrySeq()
.map(([e, r]) =>
k().createElement(t, {
key: `${e}-${r}`,
xKey: e,
xVal: r
})
)
? i.entrySeq().map(([e, r]) =>
k().createElement(t, {
key: `${e}-${r}`,
xKey: e,
xVal: r
})
)
: null
),
k().createElement(
@ -12703,19 +12687,17 @@
? k().createElement(
"select",
{ "data-variable": e, onChange: i },
r
.get("enum")
.map(r =>
k().createElement(
"option",
{
selected: r === n(t, e),
key: r,
value: r
},
r
)
r.get("enum").map(r =>
k().createElement(
"option",
{
selected: r === n(t, e),
key: r,
value: r
},
r
)
)
)
: k().createElement("input", {
type: "text",
@ -17499,7 +17481,8 @@
const { examples: t, example: r, default: a } = e;
return (
!!(Array.isArray(t) && t.length >= 1) ||
void 0 !== a || void 0 !== r
void 0 !== a ||
void 0 !== r
);
},
extractExample = e => {

View File

@ -6,6 +6,8 @@ use PandoraFMS\Modules\Events\Repositories\EventRepository;
use PandoraFMS\Modules\Events\Repositories\EventRepositoryMySQL;
use PandoraFMS\Modules\Groups\Repositories\GroupRepository;
use PandoraFMS\Modules\Groups\Repositories\GroupRepositoryMySQL;
use PandoraFMS\Modules\PandoraITSM\Inventories\Repositories\PandoraITSMInventoryRepository;
use PandoraFMS\Modules\PandoraITSM\Inventories\Repositories\PandoraITSMInventoryRepositoryMySQL;
use PandoraFMS\Modules\Shared\Repositories\Repository;
use PandoraFMS\Modules\Shared\Repositories\RepositoryMySQL;
use PandoraFMS\Modules\Users\Repositories\UserRepository;
@ -15,10 +17,10 @@ use Slim\App;
use Slim\Factory\AppFactory;
return [
'settings' => function () {
'settings' => function () {
return include __DIR__.'/settings.php';
},
App::class => function (ContainerInterface $container) {
App::class => function (ContainerInterface $container) {
AppFactory::setContainer($container);
$app = AppFactory::create();
@ -39,19 +41,22 @@ return [
return $app;
},
Repository::class => function (ContainerInterface $container) {
Repository::class => function (ContainerInterface $container) {
return $container->get(RepositoryMySQL::class);
},
TokenRepository::class => function (ContainerInterface $container) {
TokenRepository::class => function (ContainerInterface $container) {
return $container->get(TokenRepositoryMySQL::class);
},
UserRepository::class => function (ContainerInterface $container) {
UserRepository::class => function (ContainerInterface $container) {
return $container->get(UserRepositoryMySQL::class);
},
GroupRepository::class => function (ContainerInterface $container) {
GroupRepository::class => function (ContainerInterface $container) {
return $container->get(GroupRepositoryMySQL::class);
},
EventRepository::class => function (ContainerInterface $container) {
EventRepository::class => function (ContainerInterface $container) {
return $container->get(EventRepositoryMySQL::class);
},
PandoraITSMInventoryRepository::class => function (ContainerInterface $container) {
return $container->get(PandoraITSMInventoryRepositoryMySQL::class);
},
];

View File

@ -9,4 +9,5 @@ return function (App $app) {
(include __DIR__.'/../../../include/lib/Modules/Profiles/routes.php')($app);
(include __DIR__.'/../../../include/lib/Modules/Tags/routes.php')($app);
(include __DIR__.'/../../../include/lib/Modules/Users/routes.php')($app);
(include __DIR__.'/../../../include/lib/Modules/PandoraITSM/routes.php')($app);
};

View File

@ -2,7 +2,7 @@
"openapi": "3.0.0",
"info": {
"title": "API Pandora FMS",
"description": "<p>This is the new API framework for Pandora FMS.</p>\n<p>The old API is deprecated but still functional, and not all old endpoints are supported in the new API, but new endpoints will be added in each release.</p>\n<p>Using this web interface, you can play around and see how it works each endpoint interactively.</p>\n\nMore useful links:\n\n* <a target='_blank' href='https://pandorafms.com/en/pandora-fms-license-2024_en/'>Pandora FMS Licence </a>\n* <a target='_blank' href='https://support.pandorafms.com'> Pandora FMS Official Support </a>\n* <a target='_blank' href='https://pandorafms.com/en/community/'> Pandora FMS Community </a>\n* <a target='_blank' href='https://pandorafms.com/en/security/vulnerability-disclosure-policy/'> Vulnerability Disclosure Policy </a>\n* <a target='_blank' href='https://pandorafms.com/en/faq/'> Pandora FMS FAQ </a>",
"description": "<p>This is the new API framework for Pandora FMS.</p>\n<p>The old API is deprecated but still functional, and not all old endpoints are supported in the new API, but new endpoints will be added in each release.</p>\n<p>Using this web interface, you can play around and see how it works each endpoint interactively.</p>\n\nMore useful links:\n\n * <a target='_blank' href='https://pandorafms.com/en/pandora-fms-license-2024_en/'>Pandora FMS Licence </a>\n * <a target='_blank' href='https://support.pandorafms.com'> Pandora FMS Official Support </a>\n * <a target='_blank' href='https://pandorafms.com/en/community/'> Pandora FMS Community </a>\n * <a target='_blank' href='https://pandorafms.com/en/security/vulnerability-disclosure-policy/'> Vulnerability Disclosure Policy </a>\n * <a target='_blank' href='https://pandorafms.com/en/faq/'> Pandora FMS FAQ </a>",
"version": "0.0.1"
},
"servers": [
@ -1118,6 +1118,110 @@
]
}
},
"/pandoraITSM/inventory/{idPandoraITSMInventory}": {
"get": {
"tags": ["PandoraITSM"],
"summary": "Show pandoraITSMInventory",
"operationId": "09b6d1f91536441fc65dc66142a6f9cb",
"parameters": [
{
"$ref": "#/components/parameters/parameterIdPandoraITSMInventory"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/ResponsePandoraITSMInventory"
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/pandoraITSM/inventory/list": {
"post": {
"tags": ["PandoraITSM"],
"summary": "List pandoraITSMInventories",
"operationId": "149f20397779ed681c1f7680c1214974",
"parameters": [
{
"$ref": "#/components/parameters/parameterPage"
},
{
"$ref": "#/components/parameters/parameterSizePage"
},
{
"$ref": "#/components/parameters/parameterSortField"
},
{
"$ref": "#/components/parameters/parameterSortDirection"
}
],
"requestBody": {
"$ref": "#/components/requestBodies/requestBodyPandoraITSMInventoryFilter"
},
"responses": {
"200": {
"description": "List PandoraITSM Inventories Object",
"content": {
"application/json": {
"schema": {
"properties": {
"paginationData": {
"$ref": "#/components/schemas/paginationData"
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PandoraITSMInventory"
}
}
},
"type": "object"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/profile": {
"post": {
"tags": ["Profiles"],
@ -1687,6 +1791,46 @@
]
}
},
"/user/{idUser}/login": {
"get": {
"tags": ["Users"],
"summary": "show user when login process",
"operationId": "1b50ee1984a43d87d69342174571775c",
"parameters": [
{
"$ref": "#/components/parameters/parameterIdUser"
},
{
"$ref": "#/components/parameters/parameterIdUserPass"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/ResponseUser"
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/user/list": {
"post": {
"tags": ["Users"],
@ -2081,6 +2225,192 @@
}
]
},
"Event": {
"properties": {
"idEvent": {
"description": "Id event",
"type": "integer",
"readOnly": true,
"nullable": false
},
"idAgent": {
"description": "Id agent",
"type": "integer",
"default": null,
"nullable": true
},
"idUser": {
"description": "Id user",
"type": "string",
"default": null,
"nullable": true
},
"idGroup": {
"description": "Id group",
"type": "integer",
"default": null,
"nullable": true
},
"status": {
"description": "Event status, the available status are: new, validated, inprocess",
"type": "integer",
"default": "new",
"enum": ["new", "validated", "inprocess"],
"nullable": false
},
"timestamp": {
"description": "Event registration date",
"type": "string",
"default": null,
"readOnly": true,
"example": "2023-02-21 08:34:16",
"nullable": true
},
"event": {
"description": "Description event",
"type": "string",
"default": "Event created for api",
"nullable": false
},
"utimestamp": {
"description": "Event registration date",
"type": "integer",
"default": null,
"readOnly": true,
"example": "1704898868",
"nullable": true
},
"eventType": {
"description": "Event status, the available status are: going_unknown, unknown, alert_fired, alert_recovered, alert_ceased, alert_manual_validation, recon_host_detected, system, error, new_agent, going_up_critical, going_down_critical, going_up_warning, going_down_warning, going_up_normal, going_down_normal, configuration_change, ncm",
"type": "string",
"default": "unknown",
"enum": [
"going_unknown",
"unknown",
"alert_fired",
"alert_recovered",
"alert_ceased",
"alert_manual_validation",
"recon_host_detected",
"system",
"error",
"new_agent",
"going_up_critical",
"going_down_critical",
"going_up_warning",
"going_down_warning",
"going_up_normal",
"going_down_normal",
"configuration_change",
"ncm"
],
"nullable": false
},
"idAgentModule": {
"description": "Id agent module",
"type": "integer",
"default": null,
"nullable": true
},
"idAlertAm": {
"description": "Id alert action",
"type": "integer",
"default": null,
"nullable": true
},
"severity": {
"description": "Event severity, the available severity are: maintenance, informational, normal, warning, critical, minor, major",
"type": "integer",
"default": "maintenance",
"enum": [
"maintenance",
"informational",
"normal",
"warning",
"critical",
"minor",
"major"
],
"nullable": false
},
"tags": {
"description": "Tags",
"type": "string",
"default": null,
"nullable": true
},
"source": {
"description": "Source",
"type": "string",
"default": null,
"nullable": true
},
"idExtra": {
"description": "Extra id",
"type": "string",
"default": null,
"nullable": true
},
"criticalInstructions": {
"description": "Critical instructions",
"type": "string",
"default": null,
"nullable": true
},
"warningInstructions": {
"description": "Warning instructions",
"type": "string",
"default": null,
"nullable": true
},
"unknownInstructions": {
"description": "Unknows instructions",
"type": "string",
"default": null,
"nullable": true
},
"ownerUser": {
"description": "Id user",
"type": "string",
"default": null,
"nullable": true
},
"ackUtimestamp": {
"description": "Event ack utimestamp",
"type": "integer",
"default": null,
"readOnly": true,
"example": "1704898868",
"nullable": true
},
"customData": {
"description": "Custom data",
"type": "string",
"default": null,
"nullable": true
},
"data": {
"description": "Data",
"type": "string",
"default": null,
"nullable": true
},
"moduleStatus": {
"description": "Module status",
"type": "integer",
"default": null,
"readOnly": true,
"nullable": true
},
"eventCustomId": {
"description": "Events Custom Id",
"type": "string",
"default": null,
"nullable": true
}
},
"type": "object"
},
"EventFilter": {
"properties": {
"idEventFilter": {
@ -2529,6 +2859,96 @@
}
]
},
"PandoraITSMInventory": {
"properties": {
"idPandoraITSMInventory": {
"description": "Id Agent pandoraITSMInventory",
"type": "integer",
"readOnly": true,
"nullable": false
},
"agentAlias": {
"description": "Agent Name pandoraITSMInventory",
"type": "string",
"default": null,
"nullable": true
},
"osVersion": {
"description": "Agent os version pandoraITSMInventory",
"type": "string",
"default": null,
"nullable": true
},
"agentAddress": {
"description": "Agent address pandoraITSMInventory",
"type": "string",
"default": null,
"nullable": true
},
"agentUrlAddress": {
"description": "Agent url address pandoraITSMInventory",
"type": "string",
"default": null,
"nullable": true
},
"agentDisabled": {
"description": "Agent disable pandoraITSMInventory",
"type": "boolean",
"default": null,
"nullable": true
},
"groupName": {
"description": "Agent group name pandoraITSMInventory",
"type": "string",
"default": null,
"nullable": true
},
"groupId": {
"description": "Agent group id pandoraITSMInventory",
"type": "integer",
"default": null,
"nullable": true
},
"osName": {
"description": "Agent OS name pandoraITSMInventory",
"type": "string",
"default": null,
"nullable": true
}
},
"type": "object"
},
"PandoraITSMInventoryFilter": {
"type": "object",
"allOf": [
{
"$ref": "#/components/schemas/PandoraITSMInventory"
},
{
"properties": {
"idPandoraITSMInventory": {
"default": null,
"readOnly": false
},
"freeSearch": {
"description": "Find word in name field.",
"type": "string",
"default": null,
"nullable": true
}
},
"type": "object"
},
{
"properties": {
"multipleSearch": {
"$ref": "#/components/schemas/multipleSearch"
}
},
"type": "object"
}
]
},
"Profile": {
"properties": {
"idProfile": {
@ -2707,6 +3127,42 @@
}
]
},
"multipleSearch": {
"properties": {
"field": {
"description": "Field to search of query",
"type": "string",
"nullable": true
},
"data": {
"description": "Values to search of query IN()",
"type": "array",
"items": {
"type": "integer"
},
"nullable": true
}
},
"type": "object"
},
"multipleSearchString": {
"properties": {
"field": {
"description": "Field to search of query",
"type": "string",
"nullable": true
},
"data": {
"description": "Values to search of query IN()",
"type": "array",
"items": {
"type": "string"
},
"nullable": true
}
},
"type": "object"
},
"paginationData": {
"description": "Info pagination data",
"properties": {
@ -3196,12 +3652,14 @@
"type": "string",
"default": null,
"nullable": true
},
}
},
"type": "object"
},
{
"properties": {
"multipleSearchString": {
"description": "search string in field.",
"type": "string",
"default": null,
"nullable": true
"$ref": "#/components/schemas/multipleSearch"
}
},
"type": "object"
@ -3316,6 +3774,16 @@
}
}
},
"ResponseEvent": {
"description": "Event object",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Event"
}
}
}
},
"ResponseEventFilter": {
"description": "EventFilter object",
"content": {
@ -3336,6 +3804,16 @@
}
}
},
"ResponsePandoraITSMInventory": {
"description": "PandoraITSMInventory object",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PandoraITSMInventory"
}
}
}
},
"ResponseProfile": {
"description": "Profile object",
"content": {
@ -3499,6 +3977,16 @@
"default": 1
}
},
"parameterIdEvent": {
"name": "idEvent",
"in": "path",
"description": "Event id",
"required": true,
"schema": {
"type": "integer",
"default": 1
}
},
"parameterIdEventFilter": {
"name": "idEventFilter",
"in": "path",
@ -3519,6 +4007,16 @@
"default": 1
}
},
"parameterIdPandoraITSMInventory": {
"name": "idPandoraITSMInventory",
"in": "path",
"description": "PandoraITSMInventory id",
"required": true,
"schema": {
"type": "integer",
"default": 1
}
},
"parameterIdProfile": {
"name": "idProfile",
"in": "path",
@ -3580,6 +4078,16 @@
"default": 1
}
},
"parameterIdUserPass": {
"name": "password",
"in": "query",
"description": "User password",
"required": true,
"schema": {
"type": "string",
"default": null
}
},
"parameterIdUser": {
"name": "idUser",
"in": "path",
@ -3642,6 +4150,16 @@
}
}
},
"requestBodyEvent": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Event"
}
}
}
},
"requestBodyEventFilter": {
"required": true,
"content": {
@ -3682,6 +4200,26 @@
}
}
},
"requestBodyPandoraITSMInventory": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PandoraITSMInventory"
}
}
}
},
"requestBodyPandoraITSMInventoryFilter": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PandoraITSMInventoryFilter"
}
}
}
},
"requestBodyProfile": {
"required": true,
"content": {
@ -3797,6 +4335,10 @@
{
"name": "Users",
"description": "API Endpoints of users"
},
{
"name": "PandoraITSM",
"description": "API Endpoints of integration pandoraITSM"
}
]
}

View File

@ -50,10 +50,7 @@ function extension_db_status()
}
ui_print_info_message(
__('This extension checks the DB is correct. Because sometimes the old DB from a migration has not some fields in the tables or the data is changed.')
);
ui_print_info_message(
__('At the moment the checks is for MySQL/MariaDB.')
' - '.__('This extension checks the DB is correct. Because sometimes the old DB from a migration has not some fields in the tables or the data is changed.').'<br>'.' - '.__('At the moment the checks is for MySQL/MariaDB.').'<br>'.' - '.__('User must have Select, Drop, Create and References privileges.')
);
echo "<form method='post' class='max_floating_element_size'>";
@ -164,61 +161,109 @@ function extension_db_status_execute_checks($db_user, $db_password, $db_host, $d
$db_name = explode(' ', $db_name);
$db_name = $db_name[0];
if ($config['mysqli'] === true) {
$connection_test = mysqli_connect($db_host, $db_user, $db_password);
} else {
$connection_test = mysql_connect($db_host, $db_user, $db_password);
if (!$db_host) {
ui_print_error_message(__('A host must be provided'));
return;
}
if (!$db_name) {
ui_print_error_message(__('A DB name must be provided'));
return;
}
try {
if ($config['mysqli']) {
$connection_test = mysqli_connect($db_host, $db_user, $db_password);
} else {
$connection_test = mysql_connect($db_host, $db_user, $db_password);
}
} catch (Exception $e) {
$connection_test = false;
}
if (!$connection_test) {
ui_print_error_message(
__('Unsuccessful connected to the DB')
);
} else {
if ($config['mysqli'] === true) {
ui_print_error_message(__('Unsuccessful connected to the DB'));
return;
}
try {
$query = "SELECT IF(EXISTS(SELECT 1 FROM information_schema.SCHEMATA WHERE schema_name = '$db_name'), 'true', 'false') AS result";
if ($config['mysqli']) {
$exist_db = mysqli_fetch_assoc(mysqli_query($connection_test, $query))['result'];
} else {
$exist_db = mysql_fetch_assoc(mysqli_query($connection_test, $query))['result'];
}
} catch (Exception $e) {
ui_print_error_message(__("There was a problem during verification of the existence of the `$db_name` table"));
return;
}
if ($exist_db == 'true') {
ui_print_error_message(__("The testing DB `$db_name` already exists"));
return;
}
if (check_drop_privileges($connection_test) == 0) {
return;
}
try {
if ($config['mysqli']) {
$create_db = mysqli_query($connection_test, "CREATE DATABASE `$db_name`");
} else {
$create_db = mysql_query("CREATE DATABASE `$db_name`");
}
if (!$create_db) {
ui_print_error_message(
__('Unsuccessful created the testing DB')
);
} else {
if ($config['mysqli'] === true) {
mysqli_select_db($connection_test, $db_name);
} else {
mysql_select_db($db_name, $connection_test);
}
$install_tables = extension_db_status_execute_sql_file(
$config['homedir'].'/pandoradb.sql',
$connection_test
);
if (!$install_tables) {
ui_print_error_message(
__('Unsuccessful installed tables into the testing DB')
);
} else {
extension_db_check_tables_differences(
$connection_test,
$connection_system,
$db_name,
$config['dbname']
);
}
if ($config['mysqli'] === true) {
mysqli_select_db($connection_test, $db_name);
mysqli_query($connection_test, "DROP DATABASE IF EXISTS `$db_name`");
} else {
mysql_select_db($db_name, $connection_test);
mysql_query("DROP DATABASE IF EXISTS `$db_name`", $connection_test);
}
}
} catch (Exception $e) {
$connection_test = false;
}
if (!$create_db) {
ui_print_error_message(__('Unsuccessful created the testing DB'));
return;
}
if (check_ref_privileges($connection_test) == 0) {
drop_database($connection_test, $db_name);
ui_print_error_message(__('Unable to <b>create references</b> with the provided user please check its privileges'));
return;
}
if (check_explain_privileges($connection_test) == 0) {
drop_database($connection_test, $db_name);
ui_print_error_message(__('Unable to <b>explain</b> with the provided user please check its privileges'));
return;
}
try {
if ($config['mysqli'] === true) {
mysqli_select_db($connection_test, $db_name);
} else {
mysql_select_db($db_name, $connection_test);
}
} catch (Exception $e) {
drop_database($connection_test, $db_name);
ui_print_error_message(__('There was an error selecting the DB'));
return;
}
$install_tables = extension_db_status_execute_sql_file(
$config['homedir'].'/pandoradb.sql',
$connection_test
);
if (!$install_tables) {
ui_print_error_message(__('Unsuccessful installed tables into the testing DB'));
return;
}
extension_db_check_tables_differences(
$connection_test,
$connection_system,
$db_name,
$config['dbname']
);
drop_database($connection_test, $db_name);
}
@ -296,25 +341,19 @@ function extension_db_check_tables_differences(
if ($config['mysqli'] === true) {
mysqli_select_db($connection_test, $db_name_test);
$result = mysqli_query($connection_test, 'SHOW CREATE TABLE '.$table);
$tables_test = [];
while ($row = mysql_fetch_array($result)) {
ui_print_info_message(
__('You can execute this SQL query for to fix.').'<br />'.'<pre>'.$row[1].'</pre>'
);
}
$create_query = mysqli_fetch_assoc($result)['Create Table'];
mysqli_free_result($result);
ui_print_info_message(
__('You can execute this SQL query for to fix.').'<br />'.'<pre>'.$create_query.'</pre>'
);
} else {
mysql_select_db($db_name_test, $connection_test);
$result = mysql_query('SHOW CREATE TABLE '.$table, $connection_test);
$tables_test = [];
while ($row = mysql_fetch_array($result)) {
ui_print_info_message(
__('You can execute this SQL query for to fix.').'<br />'.'<pre>'.$row[1].'</pre>'
);
}
$create_query = mysqli_fetch_assoc($result)['Create Table'];
mysql_free_result($result);
ui_print_info_message(
__('You can execute this SQL query for to fix.').'<br />'.'<pre>'.$create_query.'</pre>'
);
}
}
}
@ -489,19 +528,16 @@ function extension_db_status_execute_sql_file($url, $connection)
$query .= $sql_line;
if (preg_match("/;[\040]*\$/", $sql_line)) {
if ($config['mysqli'] === true) {
if (!$result = mysqli_query($connection, $query)) {
echo mysqli_error();
// Uncomment for debug
echo "<i><br>$query<br></i>";
return 0;
}
$result = mysqli_query($connection, $query);
} else {
if (!$result = mysql_query($query, $connection)) {
echo mysql_error();
// Uncomment for debug
echo "<i><br>$query<br></i>";
return 0;
}
$result = mysql_query($query, $connection);
}
if (!$result) {
echo mysqli_error($connection);
// Uncomment for debug
echo "<i><br>$query<br></i>";
return 0;
}
$query = '';
@ -516,5 +552,200 @@ function extension_db_status_execute_sql_file($url, $connection)
}
function check_explain_privileges($connection)
{
global $config;
$has_privileges = 1;
$explain_check = 'EXPLAIN tb1';
$create_tb1 = 'CREATE TABLE tb1 (
id INT AUTO_INCREMENT PRIMARY KEY
)';
drop_database($connection, 'pandora_tmp_privilege_check');
try {
if ($config['mysqli']) {
mysqli_query($connection, 'CREATE DATABASE `pandora_tmp_privilege_check`');
} else {
mysql_query('CREATE DATABASE `pandora_tmp_privilege_check`', $connection);
}
} catch (Exception $e) {
ui_print_error_message(__('There was an error creating the DB during reference check'));
return 0;
}
try {
if ($config['mysqli'] === true) {
mysqli_select_db($connection, 'pandora_tmp_privilege_check');
} else {
mysql_select_db('reference_check', $connection);
}
} catch (Exception $e) {
ui_print_error_message(__('There was an error selecting the DB during reference check'));
return 0;
}
try {
if ($config['mysqli'] === true) {
$result = mysqli_query($connection, $create_tb1);
} else {
$result = mysql_query($create_tb1, $connection);
}
if (!$result) {
throw new Exception('Error on explain check: '.$connection->error);
}
if ($config['mysqli'] === true) {
$result = mysqli_query($connection, $explain_check);
} else {
$result = mysql_query($explain_check, $connection);
}
if (!$result) {
throw new Exception('Error on explain check: '.$connection->error);
}
} catch (Exception $e) {
$has_privileges = 0;
} finally {
drop_database($connection, 'pandora_tmp_privilege_check');
return $has_privileges;
}
}
function check_drop_privileges($connection)
{
global $config;
$has_privileges = 1;
try {
if ($config['mysqli']) {
$create_db = mysqli_query($connection, 'CREATE DATABASE IF NOT EXISTS`pandora_tmp_privilege_check`');
} else {
$create_db = mysql_query('CREATE DATABASE IF NOT EXISTS `pandora_tmp_privilege_check`', $connection);
}
} catch (Exception $e) {
$error_message = $e->getMessage();
}
if (!$create_db) {
if (stripos($error_message, 'access denied for user') !== false) {
preg_match("/'.+?'\@'.+?'/", $error_message, $error_user);
$error_user = $error_user[0];
ui_print_error_message(__('Unable to <b>create databases</b> with the provided user please check its privileges'));
return 0;
}
ui_print_error_message(__('There was an error creating the DB during drop check'));
return 0;
}
try {
if ($config['mysqli'] === true) {
mysqli_select_db($connection, 'pandora_tmp_privilege_check');
} else {
mysql_select_db('reference_check', $connection);
}
} catch (Exception $e) {
ui_print_error_message(__('There was an error selecting the DB during drop check'));
return 0;
}
try {
drop_database($connection, 'pandora_tmp_privilege_check');
} catch (Exception $e) {
$has_privileges = 0;
ui_print_error_message(
__('Unable to <b>drop databases</b> with the provided user please check its privileges.').'<br>'.__('Test databases may have been left over due to lack of drop privileges.')
);
} finally {
return $has_privileges;
}
}
function check_ref_privileges($connection)
{
global $config;
$has_privileges = 1;
drop_database($connection, 'pandora_tmp_privilege_check');
$create_tb1 = 'CREATE TABLE tb1 (
id INT AUTO_INCREMENT PRIMARY KEY
)';
$create_tb2 = 'CREATE TABLE tb2 (
id INT AUTO_INCREMENT PRIMARY KEY,
id_tb1 INT,
FOREIGN KEY (id_tb1) REFERENCES tb2(id)
)';
try {
if ($config['mysqli']) {
mysqli_query($connection, 'CREATE DATABASE `pandora_tmp_privilege_check`');
} else {
mysql_query('CREATE DATABASE `pandora_tmp_privilege_check`', $connection);
}
} catch (Exception $e) {
ui_print_error_message(__('There was an error creating the DB during reference check'));
return 0;
}
try {
if ($config['mysqli'] === true) {
mysqli_select_db($connection, 'pandora_tmp_privilege_check');
} else {
mysql_select_db('reference_check', $connection);
}
} catch (Exception $e) {
ui_print_error_message(__('There was an error selecting the DB during reference check'));
return 0;
}
try {
if ($config['mysqli'] === true) {
$result = mysqli_query($connection, $create_tb1);
} else {
$result = mysql_query($create_tb1, $connection);
}
if (!$result) {
throw new Exception('Error on reference check: '.$connection->error);
}
if ($config['mysqli'] === true) {
$result = mysqli_query($connection, $create_tb2);
} else {
$result = mysql_query($create_tb2, $connection);
}
if (!$result) {
throw new Exception('Error on reference check: '.$connection->error);
}
} catch (Exception $e) {
$has_privileges = 0;
} finally {
drop_database($connection, 'pandora_tmp_privilege_check');
return $has_privileges;
}
}
function drop_database($connection, $database)
{
global $config;
if ($config['mysqli'] === true) {
mysqli_query($connection, "DROP DATABASE IF EXISTS `$database`");
} else {
mysql_query("DROP DATABASE IF EXISTS `$database`", $connection);
}
}
extensions_add_godmode_function('extension_db_status');
extensions_add_godmode_menu_option(__('DB Schema check'), 'DM', 'gextensions', null, 'v1r1', 'gdbman');

View File

@ -81,30 +81,34 @@ function pandora_realtime_graphs()
$table->style = [];
$table->data = [];
$graph_fields['cpu_load'] = __('%s Server CPU', get_product_name());
$graph_fields['pending_packets'] = __(
'Pending packages from %s Server',
get_product_name()
);
$graph_fields['disk_io_wait'] = __(
'%s Server Disk IO Wait',
get_product_name()
);
$graph_fields['apache_load'] = __(
'%s Server Apache load',
get_product_name()
);
$graph_fields['mysql_load'] = __(
'%s Server MySQL load',
get_product_name()
);
$graph_fields['server_load'] = __(
'%s Server load',
get_product_name()
);
$graph = get_parameter('graph', 'snmp_interface');
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
$graph = get_parameter('graph', 'cpu_load');
$graph_fields['cpu_load'] = __('%s Server CPU', get_product_name());
$graph_fields['pending_packets'] = __(
'Pending packages from %s Server',
get_product_name()
);
$graph_fields['disk_io_wait'] = __(
'%s Server Disk IO Wait',
get_product_name()
);
$graph_fields['apache_load'] = __(
'%s Server Apache load',
get_product_name()
);
$graph_fields['mysql_load'] = __(
'%s Server MySQL load',
get_product_name()
);
$graph_fields['server_load'] = __(
'%s Server load',
get_product_name()
);
}
$graph_fields['snmp_interface'] = __('SNMP Interface throughput');
$graph = get_parameter('graph', 'cpu_load');
$refresh = get_parameter('refresh', '1000');
if ($graph != 'snmp_module') {
@ -196,6 +200,15 @@ function pandora_realtime_graphs()
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Filter'),
'filterbutton',
false,
[
'icon' => 'search',
'mode' => 'mini',
],
true
).html_print_submit_button(
__('Clear graph'),
'srcbutton',
false,

View File

@ -27,7 +27,7 @@ switch ($graph) {
if ($os == 'windows') {
$data = exec('wmic cpu get loadpercentage|find /I /V "Loadpercentage" | findstr /r "[0-9]" ');
} else {
$data = exec("top -bn 2 -d 0.01 | grep '^Cpu' | tail -n 1 | awk '{ print $2+$4+$6 }'");
$data = exec("top -bn 2 -d 0.01 | grep 'Cpu' | tail -n 1 | awk '{ print $2+$4+$6 }'");
}
break;
@ -55,7 +55,8 @@ switch ($graph) {
if ($os == 'windows') {
$data = exec('(FOR /F "skip=2 tokens=2 delims=\," %P IN (\'typeperf "\\Process(httpd)\\% processor time" -sc 1\') DO @echo %P)|find /V /I "..."');
} else {
$data = exec("ps aux | grep apache2 | grep -v safe | grep -v grep | awk '{ sum+=$3 } END { print sum }'");
$apache = exec('ps aux | grep apache2 | grep -v safe | grep -v grep && echo 1 || echo 0') == 1 ? 'apache2' : 'apache';
$data = exec("ps aux | grep $apache | grep -v safe | grep -v grep | awk '{ sum+=$3 } END { print sum }'");
}
break;
@ -63,7 +64,7 @@ switch ($graph) {
if ($os == 'windows') {
$data = exec('(FOR /F "skip=2 tokens=2 delims=\," %P IN (\'typeperf "\\Process(pandora_server)\\% processor time" -sc 1\') DO @echo %P)|find /V /I "..."');
} else {
$data = exec("ps aux | grep pandora_server | grep -v grep | awk '{ print $3 }'");
$data = exec("ps aux | grep pandora_server | grep -v grep | awk '{ sum+=$3 } END { print sum }'");
}
break;

View File

@ -160,10 +160,6 @@
return +(Math.round(num + "e+2") + "e-2");
}
$("#graph").change(function() {
$("form#realgraph").submit();
});
$("#refresh").change(function() {
refresh = parseInt($("#refresh").val());
resetDataPooling();

View File

@ -1747,3 +1747,8 @@ enterprise/include/class/MySQL.app.php
enterprise/include/class/Oracle.app.php
enterprise/include/class/SAP.app.php
enterprise/include/class/VMware.app.php
enterprise/include/class/DatabaseHA.class.php
enterprise/godmode/servers/HA_cluster.php
enterprise/godmode/setup/edit_skin.php
enterprise/godmode/setup/setup_skins.php
enterprise/include/functions_skins.php

View File

@ -53,7 +53,7 @@ refresh[2]="0"
source[2]="0"
source_data[2]="{\"tagente\":{\"nombre\":\"freebsd-1\"}}"
options[2]=""
style[2]="{\"shape\":\"circle\",\"image\":\"images/networkmap/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-1\"}"
style[2]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-1\"}"
id[3]="3"
id_map[3]="2"
@ -66,7 +66,7 @@ refresh[3]="0"
source[3]="0"
source_data[3]="{\"tagente\":{\"nombre\":\"macos-1\"}}"
options[3]=""
style[3]="{\"shape\":\"circle\",\"image\":\"images/networkmap/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-1\"}"
style[3]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-1\"}"
id[4]="4"
id_map[4]="2"
@ -79,7 +79,7 @@ refresh[4]="0"
source[4]="0"
source_data[4]="{\"tagente\":{\"nombre\":\"windows-1\"}}"
options[4]=""
style[4]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-1\"}"
style[4]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-1\"}"
id[5]="5"
id_map[5]="2"
@ -92,7 +92,7 @@ refresh[5]="0"
source[5]="0"
source_data[5]="{\"tagente\":{\"nombre\":\"windows-2\"}}"
options[5]=""
style[5]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-2\"}"
style[5]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-2\"}"
id[6]="6"
id_map[6]="2"
@ -105,7 +105,7 @@ refresh[6]="0"
source[6]="0"
source_data[6]="{\"tagente\":{\"nombre\":\"linux-1\"}}"
options[6]=""
style[6]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-1\"}"
style[6]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-1\"}"
id[7]="7"
id_map[7]="2"
@ -118,7 +118,7 @@ refresh[7]="0"
source[7]="0"
source_data[7]="{\"tagente\":{\"nombre\":\"linux-2\"}}"
options[7]=""
style[7]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-2\"}"
style[7]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-2\"}"
id[8]="8"
id_map[8]="2"
@ -131,7 +131,7 @@ refresh[8]="0"
source[8]="0"
source_data[8]="{\"tagente\":{\"nombre\":\"linux-3\"}}"
options[8]=""
style[8]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-3\"}"
style[8]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-3\"}"
id[9]="9"
id_map[9]="2"
@ -144,7 +144,7 @@ refresh[9]="0"
source[9]="0"
source_data[9]="{\"tagente\":{\"nombre\":\"linux-4\"}}"
options[9]=""
style[9]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-4\"}"
style[9]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-4\"}"
id[10]="10"
id_map[10]="2"
@ -157,7 +157,7 @@ refresh[10]="0"
source[10]="0"
source_data[10]="{\"tagente\":{\"nombre\":\"cisco-2\"}}"
options[10]=""
style[10]="{\"shape\":\"circle\",\"image\":\"images/networkmap/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-2\"}"
style[10]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-2\"}"
id[11]="11"
id_map[11]="2"
@ -170,7 +170,7 @@ refresh[11]="0"
source[11]="0"
source_data[11]="{\"tagente\":{\"nombre\":\"freebsd-2\"}}"
options[11]=""
style[11]="{\"shape\":\"circle\",\"image\":\"images/networkmap/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-2\"}"
style[11]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-2\"}"
id[12]="12"
id_map[12]="2"
@ -183,7 +183,7 @@ refresh[12]="0"
source[12]="0"
source_data[12]="{\"tagente\":{\"nombre\":\"macos-2\"}}"
options[12]=""
style[12]="{\"shape\":\"circle\",\"image\":\"images/networkmap/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-2\"}"
style[12]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-2\"}"
id[13]="13"
id_map[13]="2"
@ -196,7 +196,7 @@ refresh[13]="0"
source[13]="0"
source_data[13]="{\"tagente\":{\"nombre\":\"windows-3\"}}"
options[13]=""
style[13]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-3\"}"
style[13]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-3\"}"
id[14]="14"
id_map[14]="2"
@ -209,7 +209,7 @@ refresh[14]="0"
source[14]="0"
source_data[14]="{\"tagente\":{\"nombre\":\"windows-4\"}}"
options[14]=""
style[14]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-4\"}"
style[14]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-4\"}"
id[15]="15"
id_map[15]="2"
@ -222,7 +222,7 @@ refresh[15]="0"
source[15]="0"
source_data[15]="{\"tagente\":{\"nombre\":\"linux-5\"}}"
options[15]=""
style[15]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-5\"}"
style[15]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-5\"}"
id[16]="16"
id_map[16]="2"
@ -235,7 +235,7 @@ refresh[16]="0"
source[16]="0"
source_data[16]="{\"tagente\":{\"nombre\":\"linux-6\"}}"
options[16]=""
style[16]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-6\"}"
style[16]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-6\"}"
id[17]="17"
id_map[17]="2"
@ -248,7 +248,7 @@ refresh[17]="0"
source[17]="0"
source_data[17]="{\"tagente\":{\"nombre\":\"linux-7\"}}"
options[17]=""
style[17]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-7\"}"
style[17]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-7\"}"
id[18]="18"
id_map[18]="2"
@ -261,7 +261,7 @@ refresh[18]="0"
source[18]="0"
source_data[18]="{\"tagente\":{\"nombre\":\"linux-8\"}}"
options[18]=""
style[18]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-8\"}"
style[18]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-8\"}"
id[19]="19"
id_map[19]="2"
@ -274,7 +274,7 @@ refresh[19]="0"
source[19]="0"
source_data[19]="{\"tagente\":{\"nombre\":\"cisco-3\"}}"
options[19]=""
style[19]="{\"shape\":\"circle\",\"image\":\"images/networkmap/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-3\"}"
style[19]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-3\"}"
id[20]="20"
id_map[20]="2"
@ -287,7 +287,7 @@ refresh[20]="0"
source[20]="0"
source_data[20]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
options[20]=""
style[20]="{\"shape\":\"circle\",\"image\":\"images/networkmap/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-3\"}"
style[20]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-3\"}"
id[21]="21"
id_map[21]="2"
@ -300,7 +300,7 @@ refresh[21]="0"
source[21]="0"
source_data[21]="{\"tagente\":{\"nombre\":\"macos-3\"}}"
options[21]=""
style[21]="{\"shape\":\"circle\",\"image\":\"images/networkmap/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-3\"}"
style[21]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-3\"}"
id[22]="22"
id_map[22]="2"
@ -313,7 +313,7 @@ refresh[22]="0"
source[22]="0"
source_data[22]="{\"tagente\":{\"nombre\":\"windows-5\"}}"
options[22]=""
style[22]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-5\"}"
style[22]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-5\"}"
id[23]="23"
id_map[23]="2"
@ -326,7 +326,7 @@ refresh[23]="0"
source[23]="0"
source_data[23]="{\"tagente\":{\"nombre\":\"windows-6\"}}"
options[23]=""
style[23]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-6\"}"
style[23]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-6\"}"
id[24]="24"
id_map[24]="2"
@ -339,7 +339,7 @@ refresh[24]="0"
source[24]="0"
source_data[24]="{\"tagente\":{\"nombre\":\"linux-9\"}}"
options[24]=""
style[24]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-9\"}"
style[24]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-9\"}"
id[25]="25"
id_map[25]="2"
@ -352,7 +352,7 @@ refresh[25]="0"
source[25]="0"
source_data[25]="{\"tagente\":{\"nombre\":\"linux-10\"}}"
options[25]=""
style[25]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-10\"}"
style[25]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-10\"}"
id[26]="26"
id_map[26]="2"
@ -365,7 +365,7 @@ refresh[26]="0"
source[26]="0"
source_data[26]="{\"tagente\":{\"nombre\":\"linux-11\"}}"
options[26]=""
style[26]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-11\"}"
style[26]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-11\"}"
id[27]="27"
id_map[27]="2"
@ -378,13 +378,13 @@ refresh[27]="0"
source[27]="0"
source_data[27]="{\"tagente\":{\"nombre\":\"linux-12\"}}"
options[27]=""
style[27]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-12\"}"
style[27]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-12\"}"
[trel_item]
id[1]="1"
id_parent[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"11\",\"x\":\"1184\",\"y\":\"-25\",\"z\":\"0\"}}"
id_parent[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-1\"}},\"x\":\"1184\",\"y\":\"-25\",\"z\":\"0\"}}"
id_map[1]="2"
id_parent_source_data[1]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[1]="{\"tagente\":{\"nombre\":\"freebsd-1\"}}"
@ -394,8 +394,8 @@ id_item[1]="0"
deleted[1]="0"
id[2]="2"
id_parent[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"10\",\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}"
id_parent[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-1\"}},\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}"
id_map[2]="2"
id_parent_source_data[2]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[2]="{\"tagente\":{\"nombre\":\"macos-1\"}}"
@ -405,8 +405,8 @@ id_item[2]="0"
deleted[2]="0"
id[3]="3"
id_parent[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"8\",\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
id_parent[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-1\"}},\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
id_map[3]="2"
id_parent_source_data[3]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[3]="{\"tagente\":{\"nombre\":\"windows-1\"}}"
@ -416,8 +416,8 @@ id_item[3]="0"
deleted[3]="0"
id[4]="4"
id_parent[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"9\",\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
id_parent[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-2\"}},\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
id_map[4]="2"
id_parent_source_data[4]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[4]="{\"tagente\":{\"nombre\":\"windows-2\"}}"
@ -427,8 +427,8 @@ id_item[4]="0"
deleted[4]="0"
id[5]="5"
id_parent[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"8\",\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
id_child[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"4\",\"x\":\"342\",\"y\":\"-273\",\"z\":\"0\"}}"
id_parent[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-1\"}},\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
id_child[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-1\"}},\"x\":\"342\",\"y\":\"-273\",\"z\":\"0\"}}"
id_map[5]="2"
id_parent_source_data[5]="{\"tagente\":{\"nombre\":\"windows-1\"}}"
id_child_source_data[5]="{\"tagente\":{\"nombre\":\"linux-1\"}}"
@ -438,8 +438,8 @@ id_item[5]="0"
deleted[5]="0"
id[6]="6"
id_parent[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"8\",\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
id_child[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"5\",\"x\":\"240\",\"y\":\"-7\",\"z\":\"0\"}}"
id_parent[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-1\"}},\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
id_child[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-2\"}},\"x\":\"240\",\"y\":\"-7\",\"z\":\"0\"}}"
id_map[6]="2"
id_parent_source_data[6]="{\"tagente\":{\"nombre\":\"windows-1\"}}"
id_child_source_data[6]="{\"tagente\":{\"nombre\":\"linux-2\"}}"
@ -449,8 +449,8 @@ id_item[6]="0"
deleted[6]="0"
id[7]="7"
id_parent[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"9\",\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
id_child[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"6\",\"x\":\"214\",\"y\":\"275\",\"z\":\"0\"}}"
id_parent[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-2\"}},\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
id_child[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-3\"}},\"x\":\"214\",\"y\":\"275\",\"z\":\"0\"}}"
id_map[7]="2"
id_parent_source_data[7]="{\"tagente\":{\"nombre\":\"windows-2\"}}"
id_child_source_data[7]="{\"tagente\":{\"nombre\":\"linux-3\"}}"
@ -460,8 +460,8 @@ id_item[7]="0"
deleted[7]="0"
id[8]="8"
id_parent[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"9\",\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
id_child[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"7\",\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}"
id_parent[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-2\"}},\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
id_child[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-4\"}},\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}"
id_map[8]="2"
id_parent_source_data[8]="{\"tagente\":{\"nombre\":\"windows-2\"}}"
id_child_source_data[8]="{\"tagente\":{\"nombre\":\"linux-4\"}}"
@ -471,8 +471,8 @@ id_item[8]="0"
deleted[8]="0"
id[9]="9"
id_parent[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"22\",\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
id_parent[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-2\"}},\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
id_map[9]="2"
id_parent_source_data[9]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[9]="{\"tagente\":{\"nombre\":\"cisco-2\"}}"
@ -482,8 +482,8 @@ id_item[9]="0"
deleted[9]="0"
id[10]="10"
id_parent[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"21\",\"x\":\"892\",\"y\":\"-47\",\"z\":\"0\"}}"
id_parent[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-2\"}},\"x\":\"892\",\"y\":\"-47\",\"z\":\"0\"}}"
id_map[10]="2"
id_parent_source_data[10]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[10]="{\"tagente\":{\"nombre\":\"freebsd-2\"}}"
@ -493,8 +493,8 @@ id_item[10]="0"
deleted[10]="0"
id[11]="11"
id_parent[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"20\",\"x\":\"1150\",\"y\":\"409\",\"z\":\"0\"}}"
id_parent[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-2\"}},\"x\":\"1150\",\"y\":\"409\",\"z\":\"0\"}}"
id_map[11]="2"
id_parent_source_data[11]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[11]="{\"tagente\":{\"nombre\":\"macos-2\"}}"
@ -504,8 +504,8 @@ id_item[11]="0"
deleted[11]="0"
id[12]="12"
id_parent[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"22\",\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
id_child[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"18\",\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
id_parent[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-2\"}},\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
id_child[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-3\"}},\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
id_map[12]="2"
id_parent_source_data[12]="{\"tagente\":{\"nombre\":\"cisco-2\"}}"
id_child_source_data[12]="{\"tagente\":{\"nombre\":\"windows-3\"}}"
@ -515,8 +515,8 @@ id_item[12]="0"
deleted[12]="0"
id[13]="13"
id_parent[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"22\",\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
id_child[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"19\",\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
id_parent[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-2\"}},\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
id_child[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-4\"}},\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
id_map[13]="2"
id_parent_source_data[13]="{\"tagente\":{\"nombre\":\"cisco-2\"}}"
id_child_source_data[13]="{\"tagente\":{\"nombre\":\"windows-4\"}}"
@ -526,8 +526,8 @@ id_item[13]="0"
deleted[13]="0"
id[14]="14"
id_parent[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"18\",\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
id_child[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"14\",\"x\":\"314\",\"y\":\"845\",\"z\":\"0\"}}"
id_parent[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-3\"}},\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
id_child[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-5\"}},\"x\":\"314\",\"y\":\"845\",\"z\":\"0\"}}"
id_map[14]="2"
id_parent_source_data[14]="{\"tagente\":{\"nombre\":\"windows-3\"}}"
id_child_source_data[14]="{\"tagente\":{\"nombre\":\"linux-5\"}}"
@ -537,8 +537,8 @@ id_item[14]="0"
deleted[14]="0"
id[15]="15"
id_parent[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"18\",\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
id_child[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"15\",\"x\":\"474\",\"y\":\"1043\",\"z\":\"0\"}}"
id_parent[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-3\"}},\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
id_child[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-6\"}},\"x\":\"474\",\"y\":\"1043\",\"z\":\"0\"}}"
id_map[15]="2"
id_parent_source_data[15]="{\"tagente\":{\"nombre\":\"windows-3\"}}"
id_child_source_data[15]="{\"tagente\":{\"nombre\":\"linux-6\"}}"
@ -548,8 +548,8 @@ id_item[15]="0"
deleted[15]="0"
id[16]="16"
id_parent[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"19\",\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
id_child[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"16\",\"x\":\"1812\",\"y\":\"1011\",\"z\":\"0\"}}"
id_parent[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-4\"}},\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
id_child[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-7\"}},\"x\":\"1812\",\"y\":\"1011\",\"z\":\"0\"}}"
id_map[16]="2"
id_parent_source_data[16]="{\"tagente\":{\"nombre\":\"windows-4\"}}"
id_child_source_data[16]="{\"tagente\":{\"nombre\":\"linux-7\"}}"
@ -559,8 +559,8 @@ id_item[16]="0"
deleted[16]="0"
id[17]="17"
id_parent[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"19\",\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
id_child[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"17\",\"x\":\"1828\",\"y\":\"723\",\"z\":\"0\"}}"
id_parent[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-4\"}},\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
id_child[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-8\"}},\"x\":\"1828\",\"y\":\"723\",\"z\":\"0\"}}"
id_map[17]="2"
id_parent_source_data[17]="{\"tagente\":{\"nombre\":\"windows-4\"}}"
id_child_source_data[17]="{\"tagente\":{\"nombre\":\"linux-8\"}}"
@ -570,8 +570,8 @@ id_item[17]="0"
deleted[17]="0"
id[18]="18"
id_parent[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"10\",\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}"
id_child[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"32\",\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
id_parent[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-1\"}},\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}"
id_child[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-3\"}},\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
id_map[18]="2"
id_parent_source_data[18]="{\"tagente\":{\"nombre\":\"macos-1\"}}"
id_child_source_data[18]="{\"tagente\":{\"nombre\":\"cisco-3\"}}"
@ -581,8 +581,8 @@ id_item[18]="0"
deleted[18]="0"
id[19]="19"
id_parent[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"7\",\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}"
id_child[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_parent[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-4\"}},\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}"
id_child[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_map[19]="2"
id_parent_source_data[19]="{\"tagente\":{\"nombre\":\"linux-4\"}}"
id_child_source_data[19]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
@ -592,8 +592,8 @@ id_item[19]="0"
deleted[19]="0"
id[20]="20"
id_parent[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"30\",\"x\":\"-140\",\"y\":\"299\",\"z\":\"0\"}}"
id_parent[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-3\"}},\"x\":\"-140\",\"y\":\"299\",\"z\":\"0\"}}"
id_map[20]="2"
id_parent_source_data[20]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
id_child_source_data[20]="{\"tagente\":{\"nombre\":\"macos-3\"}}"
@ -603,8 +603,8 @@ id_item[20]="0"
deleted[20]="0"
id[21]="21"
id_parent[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"28\",\"x\":\"-390\",\"y\":\"385\",\"z\":\"0\"}}"
id_parent[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-5\"}},\"x\":\"-390\",\"y\":\"385\",\"z\":\"0\"}}"
id_map[21]="2"
id_parent_source_data[21]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
id_child_source_data[21]="{\"tagente\":{\"nombre\":\"windows-5\"}}"
@ -614,8 +614,8 @@ id_item[21]="0"
deleted[21]="0"
id[22]="22"
id_parent[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"29\",\"x\":\"-470\",\"y\":\"671\",\"z\":\"0\"}}"
id_parent[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-6\"}},\"x\":\"-470\",\"y\":\"671\",\"z\":\"0\"}}"
id_map[22]="2"
id_parent_source_data[22]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
id_child_source_data[22]="{\"tagente\":{\"nombre\":\"windows-6\"}}"
@ -625,8 +625,8 @@ id_item[22]="0"
deleted[22]="0"
id[23]="23"
id_parent[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"24\",\"x\":\"-296\",\"y\":\"899\",\"z\":\"0\"}}"
id_parent[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-9\"}},\"x\":\"-296\",\"y\":\"899\",\"z\":\"0\"}}"
id_map[23]="2"
id_parent_source_data[23]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
id_child_source_data[23]="{\"tagente\":{\"nombre\":\"linux-9\"}}"
@ -636,8 +636,8 @@ id_item[23]="0"
deleted[23]="0"
id[24]="24"
id_parent[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"25\",\"x\":\"-25\",\"y\":\"961\",\"z\":\"0\"}}"
id_parent[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-10\"}},\"x\":\"-25\",\"y\":\"961\",\"z\":\"0\"}}"
id_map[24]="2"
id_parent_source_data[24]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
id_child_source_data[24]="{\"tagente\":{\"nombre\":\"linux-10\"}}"
@ -647,8 +647,8 @@ id_item[24]="0"
deleted[24]="0"
id[25]="25"
id_parent[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"32\",\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
id_child[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"26\",\"x\":\"1683\",\"y\":\"13\",\"z\":\"0\"}}"
id_parent[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-3\"}},\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
id_child[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-11\"}},\"x\":\"1683\",\"y\":\"13\",\"z\":\"0\"}}"
id_map[25]="2"
id_parent_source_data[25]="{\"tagente\":{\"nombre\":\"cisco-3\"}}"
id_child_source_data[25]="{\"tagente\":{\"nombre\":\"linux-11\"}}"
@ -658,8 +658,8 @@ id_item[25]="0"
deleted[25]="0"
id[26]="26"
id_parent[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"32\",\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
id_child[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"27\",\"x\":\"2135\",\"y\":\"51\",\"z\":\"0\"}}"
id_parent[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-3\"}},\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
id_child[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-12\"}},\"x\":\"2135\",\"y\":\"51\",\"z\":\"0\"}}"
id_map[26]="2"
id_parent_source_data[26]="{\"tagente\":{\"nombre\":\"cisco-3\"}}"
id_child_source_data[26]="{\"tagente\":{\"nombre\":\"linux-12\"}}"

View File

@ -1,4 +1,4 @@
pandorafms.vmware=a272ee00a9b5f201bb708bef72bbe276
pandorafms.vmware=3d1785e1baa07db0a40b9e47bb30472c
pandorafms.mysql=33d470c7492214d4b384ed307e81adf4
pandorafms.vmware=1deafce1d55d3574645d8b136104e9ad
pandorafms.mysql=ca7dd8b80a1a03a25eb0fb077818ad63

View File

@ -64,7 +64,7 @@ ALTER TABLE `tmerge_queries` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_09
-- Update version for plugin oracle
UPDATE `tdiscovery_apps` SET `version` = '1.2' WHERE `short_name` = 'pandorafms.oracle';
-- Update version for plugin oracle
UPDATE `tdiscovery_apps` SET `version` = '1.3' WHERE `short_name` = 'pandorafms.vmware';
UPDATE `tdiscovery_apps` SET `version` = '1.4' WHERE `short_name` = 'pandorafms.vmware';
ALTER TABLE `tevent_sound` MODIFY COLUMN `name` text NULL;
ALTER TABLE `tevent_sound` MODIFY COLUMN `sound` text NULL;

View File

@ -1,7 +1,21 @@
START TRANSACTION;
-- START MIGRATION MSSQL --
-- Remove column id_usuario_destino from tmensajes --
SET @exist = (SELECT count(*) FROM information_schema.columns WHERE TABLE_NAME='tmensajes' AND COLUMN_NAME='id_usuario_destino' AND table_schema = DATABASE());
SET @sqlstmt = IF (@exist>0, 'ALTER TABLE `tmensajes` DROP COLUMN `id_usuario_destino`', 'SELECT ""');
prepare stmt from @sqlstmt;
execute stmt;
DROP TABLE IF EXISTS tskin;
ALTER TABLE tfavmenu_user CONVERT TO CHARACTER SET UTF8MB4;
ALTER TABLE tfiles_repo CONVERT TO CHARACTER SET UTF8MB4;
ALTER TABLE tfiles_repo_group CONVERT TO CHARACTER SET UTF8MB4;
ALTER TABLE `tusuario`
ADD COLUMN `stop_lts_modal` TINYINT NOT NULL DEFAULT 0 AFTER `session_max_time_expire`;
-- START MIGRATION MSSQL --
SET @current_app_type = 12;
SET @short_name = 'pandorafms.mssql';
SET @name = 'Microsoft&#x20;SQL&#x20;Server';
@ -7672,4 +7686,77 @@ UPDATE `trecon_task`
-- END MIGRATION SAP DESET --
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/03_monitoring/06_web_monitoring' WHERE title = '¿Sab&iacute;as&#x20;que&#x20;puedes&#x20;monitorizar&#x20;webs?';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/03_monitoring/03_remote_monitoring#monitorizacion_snmp' WHERE title = 'Monitorizaci&oacute;n&#x20;remota&#x20;de&#x20;dispositivos&#x20;SNMP';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/03_monitoring/03_remote_monitoring#monitorizacion_de_rutas' WHERE title = 'Monitorizar&#x20;rutas&#x20;desde&#x20;una&#x20;IP&#x20;a&#x20;otra';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/04_using/11_managing_and_administration#paradas_de_servicio_planificadas' WHERE title = 'Paradas&#x20;planificadas';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/pandorafms/management_and_operation/01_alerts#configuracion_de_correos_para_alertas_en_pandora_fms' WHERE title = 'Personalizar&#x20;los&#x20;emails&#x20;de&#x20;alerta&#x20;';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id=es/documentation/04_using/05_data_presentation_visual_maps' WHERE title = 'Usando&#x20;iconos&#x20;personalizados&#x20;en&#x20;consolas&#x20;visuales&#x20;';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/04_using/05_data_presentation_visual_maps#mapa_de_calor_o_nube_de_color' WHERE title = 'Consolas&#x20;visuales:&#x20;mapas&#x20;de&#x20;calor&#x20;';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/04_using/11_managing_and_administration#log_de_auditoria' WHERE title = 'Auditor&iacute;a&#x20;interna&#x20;de&#x20;la&#x20;consola&#x20;';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id=es/documentation/02_installation/05_configuration_agents#configuracion_automatica_de_agentes' WHERE title = 'Sistema&#x20;de&#x20;provisi&oacute;n&#x20;autom&aacute;tica&#x20;de&#x20;agentes&#x20;';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/04_using/05_data_presentation_visual_maps#enlace_de_red' WHERE title = 'Enlaces&#x20;de&#x20;red&#x20;en&#x20;la&#x20;consola&#x20;visual&#x20;';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/04_using/08_data_presentation_reports#grafico_de_disponibilidad' WHERE title = 'Gr&aacute;ficas&#x20;de&#x20;disponibilidad&#x20;';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/04_using/12_console_setup?s%5B%5D%3Dcontrase%25C3%25B1as#password_policy' WHERE title = 'Pol&iacute;tica&#x20;de&#x20;contrase&ntilde;as';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/12_console_setup?s%5B%5D%3Dgoogle%26s%5B%5D%3Dauth#authentication' WHERE title = 'Autenticaci&oacute;n&#x20;de&#x20;doble&#x20;factor&#x20;';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/03_monitoring/06_web_monitoring' WHERE title = 'Did&#x20;you&#x20;know&#x20;that&#x20;you&#x20;can&#x20;monitor&#x20;websites?';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/11_managing_and_administration#log_de_auditoria' WHERE title = 'Console&#x20;Internal&#x20;Audit';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/12_console_setup?s%5B%5D%3Dgoogle%26s%5B%5D%' WHERE title = 'Two-factor&#x20;authentication';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/05_data_presentation_visual_maps#mapa_de_cal' WHERE title = 'Visual&#x20;consoles:&#x20;heat&#x20;maps';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/05_data_presentation_visual_maps#enlace_de_red' WHERE title = 'Network&#x20;links&#x20;in&#x20;the&#x20;visual&#x20;console';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/08_data_presentation_reports#grafico_de_disp' WHERE title = 'Availability&#x20;graphs';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/03_monitoring/03_remote_monitoring#monitorizacion_snmp' WHERE title = 'Remote&#x20;monitoring&#x20;of&#x20;SNMP&#x20;devices';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/03_monitoring/03_remote_monitoring#monitorizacion_de_rutas' WHERE title = 'Monitor&#x20;routes&#x20;from&#x20;one&#x20;IP&#x20;to&#x20;another';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/11_managing_and_administration#scheduled_downtimes' WHERE title = 'Scheduled&#x20;downtimes';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/01_alerts#editing_an_action' WHERE title = 'Customize&#x20;alert&#x20;emails';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/12_console_setup?s%5B%5D%3Dcontrase%25C3%25B' WHERE title = 'password&#x20;policy';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id=en/documentation/02_installation/05_configuration_agents#conf' WHERE title = 'Automatic&#x20;agent&#x20;provision&#x20;system';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id=en/documentation/02_installation/05_configuration_agents#conf' WHERE title = 'Automatic&#x20;agent&#x20;provision&#x20;system';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id=en/documentation/02_installation/05_configuration_agents#conf' WHERE title = 'Automatic&#x20;agent&#x20;provision&#x20;system';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id=en/documentation/04_using/05_data_presentation_visual_maps' WHERE title = 'Using&#x20;custom&#x20;icons&#x20;in&#x20;visual&#x20;consoles';
DELETE FROM tconfig WHERE `token` = 'legacy_database_ha';
UPDATE tncm_script SET `content` = 'sleep:1&#x0d;&#x0a;capture:export&#92;n&#92;r&#x20;&#x0d;&#x0a;exit&#92;n&#92;r' where `content` = 'sleep:1&#x0d;&#x0a;capture:system&#x20;resource&#x20;print&#92;n&#92;r&#x20;&#x0d;&#x0a;exit&#92;n&#92;r';
-- Add new columns in tdeployment_hosts
ALTER TABLE `tdeployment_hosts` ADD COLUMN `deploy_method` ENUM('SSH', 'HTTP', 'HTTPS') DEFAULT 'SSH';
ALTER TABLE `tdeployment_hosts` ADD COLUMN `deploy_port` INT UNSIGNED NOT NULL DEFAULT 22;
ALTER TABLE `tdeployment_hosts` ADD COLUMN `server_port` INT UNSIGNED NOT NULL DEFAULT 41121;
ALTER TABLE `tdeployment_hosts` ADD COLUMN `temp_folder` VARCHAR(500) DEFAULT '/tmp';
UPDATE
`tdeployment_hosts`, `tconfig_os`
SET
`tdeployment_hosts`.`deploy_method` = 'HTTP',
`tdeployment_hosts`.`deploy_port` = 5985,
`tdeployment_hosts`.`temp_folder` = 'C:&#92;Windows&#92;Temp'
WHERE
`tdeployment_hosts`.`id_os` = `tconfig_os`.`id_os` AND `tconfig_os`.`name` = 'Windows' AND `tdeployment_hosts`.`deployed` = 0;
-- Find the name of the foreign key constraint
SELECT @constraint_name := `constraint_name`
FROM `information_schema`.`key_column_usage`
WHERE `table_name` = 'tdeployment_hosts' AND `column_name` = 'id_os';
-- Drop the foreign key constraint using dynamic SQL
SET @drop_fk_query = CONCAT('ALTER TABLE `tdeployment_hosts` DROP FOREIGN KEY ', @constraint_name);
PREPARE stmt FROM @drop_fk_query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
-- Drop unused columns in tdeployment_hosts
ALTER TABLE `tdeployment_hosts` DROP COLUMN `id_os`;
ALTER TABLE `tdeployment_hosts` DROP COLUMN `os_version`;
ALTER TABLE `tdeployment_hosts` DROP COLUMN `arch`;
-- Update all deployment recon tasks port
UPDATE `trecon_task` SET `field4` = 41121 WHERE `type` = 9;
-- Update execution in proxmox discovery plugin
SET @short_name = 'pandorafms.proxmox';
SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_name;
UPDATE `tdiscovery_apps_executions` SET `execution` = '&#039;_exec1_&#039;&#x20;--conf&#x20;&#039;_tempfileProxmox_&#039;' WHERE `id_app` = @id_app;
COMMIT;

View File

@ -41,39 +41,28 @@ ui_print_standard_header(
);
ui_require_css_file('first_task');
?>
<?php
ui_print_info_message(['no_close' => true, 'message' => __('There are no clusters defined yet.') ]);
?>
<div class="new_task">
<div class="image_task">
<?php echo html_print_image('images/first_task/icono-cluster-activo.png', true, ['title' => __('Clusters')]); ?>
</div>
<div class="text_task">
<h3> <?php echo __('Create Cluster'); ?></h3>
<p id="description_task">
<?php
echo __('A cluster is a group of devices that provide the same service in high availability.').'<br><br>';
$msg = __('A cluster is a group of devices that provide the same service in high availability.').'<br>';
echo __('Depending on how they provide that service, we can find two types:').'<br><br>';
$msg .= __('Depending on how they provide that service, we can find two types:').'<br><br>';
echo __('<b>Clusters to balance the service load</b>: these are active - active (A/A) mode clusters. It means that all the nodes (or machines that compose it) are working. They must be working because if one stops working, it will overload the others.').'<br><br>';
$msg .= __('Clusters to balance the service load: these are active - active (A/A) mode clusters. It means that all the nodes (or machines that compose it) are working. They must be working because if one stops working, it will overload the others.').'<br><br>';
echo __('<b>Clusters to guarantee service</b>: these are active - passive (A/P) mode clusters. It means that one of the nodes (or machines that make up the cluster) will be running (primary) and another won\'t (secondary). When the primary goes down, the secondary must take over and give the service instead. Although many of the elements of this cluster are active-passive, it will also have active elements in both of them that indicate that the passive node is "online", so that in the case of a service failure in the master, the active node collects this information.');
?>
</p>
<?php
if (check_acl($config['id_user'], 0, 'AW')) {
?>
<form action='index.php?sec=estado&sec2=operation/cluster/cluster&op=new' method="post">
<input type="submit" class="button_task ui_toggle" value="<?php echo __('Create Cluster'); ?>" />
</form>
<?php
}
?>
</div>
</div>
$msg .= __('Clusters to guarantee service: these are active - passive (A/P) mode clusters. It means that one of the nodes (or machines that make up the cluster) will be running (primary) and another will not (secondary). When the primary goes down, the secondary must take over and give the service instead. Although many of the elements of this cluster are active-passive, it will also have active elements in both of them that indicate that the passive node is "online", so that in the case of a service failure in the master, the active node collects this information.');
$button = false;
if (check_acl($config['id_user'], 0, 'AW')) {
$button = "
<form action='index.php?sec=estado&sec2=operation/cluster/cluster&op=new' method='post'>
<input type='submit' class='button_task button_task_mini mrgn_0px_imp' value='".__('Create cluster')."' />
</form>";
}
echo ui_print_empty_view(
__('There are no defined clusters'),
$msg,
'clusters.svg',
$button
);

View File

@ -14,36 +14,22 @@
global $config;
check_login();
ui_require_css_file('first_task');
?>
$msg = __(
'Graphs are designed to show the data collected by %s in a temporary scale defined by the user. %s Graphs display data in real time. They are generated every time the operator requires any of them and display the up-to-date state.',
get_product_name(),
get_product_name()
);
<div class="new_task">
<div class="image_task">
<?php echo html_print_image('images/first_task/icono_grande_custom_reporting.png', true, ['title' => __('Custom Graphs')]); ?>
</div>
<div class="text_task">
<h3> <?php echo __('Create Custom Graph'); ?></h3><p id="description_task">
<?php
echo __(
"Graphs are designed to show the data collected by %s in a temporary scale defined by the user.
%s Graphs display data in real time. They are generated every time the operator requires any of them and display the up-to-date state.
There are two types of graphs: The agent's automated graphs and the graphs the user customizes by using one or more modules to do so.",
get_product_name(),
get_product_name()
);
?>
</p>
<form action="index.php?sec=reporting&sec2=godmode/reporting/graph_builder" method="post">
<?php
html_print_action_buttons(
html_print_submit_button(
__('Create Custom Graph'),
'button_task',
false,
['icon' => 'wand'],
true
)
);
?>
</form>
</div>
</div>
$msg .= '<br><br>'.__("There are two types of graphs: The agent's automated graphs and the graphs the user customizes by using one or more modules to do so.");
$url_new = 'index.php?sec=reporting&sec2=godmode/reporting/graph_builder';
$button = '<form action="'.$url_new.'" method="post">
<input type="submit" class="button_task button_task_mini mrgn_0px_imp" value="'.__('Create custom graph').'" />
</form>';
echo ui_print_empty_view(
__('Create custom graph'),
$msg,
'custom-graph.svg',
$button
);

View File

@ -34,37 +34,30 @@ check_login();
ui_require_css_file('first_task');
if ($vconsoles_write || $vconsoles_manage) {
?>
$msg = __(
'%s allows users to create visual maps on which each user is able to create his or her own monitoring map. The new visual console editor is much more practical, although the prior visual console editor had its advantages.',
get_product_name()
);
<div class="new_task">
<div class="image_task">
<?php echo html_print_image('images/first_task/icono_grande_visualconsole.png', true, ['title' => __('Visual Console')]); ?>
</div>
<div class="text_task">
<h3> <?php echo __('Visual Consoles'); ?></h3><p id="description_task">
<?php
echo __(
'%s allows users to create visual maps on which each user is able to create his or her '.'own monitoring map. The new visual console editor is much more practical, although the prior '."visual console editor had its advantages. On the new visual console, we've been successful in "."imitating the sensation and touch of a drawing application like GIMP. We've also simplified the "."editor by dividing it into several subject-divided tabs named 'Data', 'Preview', 'Wizard', 'List of "."Elements' and 'Editor'. The items the %s Visual Map was designed to handle are "."'static images', 'percentage bars', 'module graphs' and 'simple values'.",
get_product_name(),
get_product_name()
);
?>
</p>
<form action="index.php?sec=network&amp;sec2=godmode/reporting/visual_console_builder" method="post">
<?php
html_print_input_hidden('edit_layout', 1);
html_print_action_buttons(
html_print_submit_button(
__('Create a Visual Console'),
'button_task',
false,
['icon' => 'wand'],
true
)
);
?>
</form>
</div>
</div>
<?php
$msg .= '<br><br>'.__(
"On the new visual console, we have been successful in imitating the sensation and touch of a drawing application like GIMP. We have also simplified the editor by dividing it into several subject-divided tabs named 'Data', 'Preview', 'Wizard', 'List of Elements' and 'Editor'."
);
$msg .= '<br><br>'.__(
" The items the %s Visual Map was designed to handle are 'static images', 'percentage bars', 'module graphs' and 'simple values'",
get_product_name()
);
$url_new = 'index.php?sec=network&amp;sec2=godmode/reporting/visual_console_builder';
$button = '<form action="'.$url_new.'" method="post">';
$button .= html_print_input_hidden('edit_layout', 1);
$button .= '<input type="submit" class="button_task button_task_mini mrgn_0px_imp" value="'.__('Create visual console').'" />';
$button .= '</form>';
echo ui_print_empty_view(
__('There are no customized visual consoles'),
$msg,
'visual-console.svg',
$button
);
}

View File

@ -31,40 +31,25 @@ global $config;
check_login();
ui_require_css_file('first_task');
?>
<?php if ((bool) $agent_w === true) { ?>
<div class="new_task">
<div class="image_task">
<?php echo html_print_image('images/item-service.svg', true, ['title' => __('Services'), 'class' => 'w120px']); ?>
</div>
<div class="text_task">
<h3> <?php echo __('Services'); ?></h3>
<p id="description_task">
<?php
echo __(
"A service is a way to group your IT resources based on their functionalities.
if ((bool) $agent_w === true) {
$msg = __(
'A service is a way to group your IT resources based on their functionalities.
A service could be e.g. your official website, your CRM system, your support application, or even your printers.
Services are logical groups which can include hosts, routers, switches, firewalls, CRMs, ERPs, websites and numerous other services.
By the following example, you're able to see more clearly what a service is:
By the following example, you are able to see more clearly what a service is:
A chip manufacturer sells computers by its website all around the world.
His company consists of three big departments: A management, an on-line shop and support."
);
?>
</p>
<form action="index.php?sec=estado&sec2=enterprise/godmode/services/services.service&action=new_service" method="post">
<?php
html_print_action_buttons(
html_print_submit_button(
__('Create a service'),
'button_task',
false,
['icon' => 'wand'],
true
)
);
?>
</form>
</div>
</div>
<?php
His company consists of three big departments: A management, an on-line shop and support.'
);
$url_new = 'index.php?sec=estado&sec2=enterprise/godmode/services/services.service&action=new_service';
$button = '<form action="'.$url_new.'" method="post">
<input type="submit" class="button_task button_task_mini mrgn_0px_imp" value="'.__('Configure services').'" />
</form>';
echo ui_print_empty_view(
__('No services found'),
$msg,
'services.svg',
$button
);
}

View File

@ -52,7 +52,7 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
}
// ======= Servers List ===============================================
if ((bool) check_acl($config['id_user'], 0, 'AW') !== false) {
if ((bool) check_acl($config['id_user'], 0, 'PM') !== false) {
$servers = [];
$servers_info = servers_get_info();
@ -140,7 +140,6 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
}
}
$search_bar .= '<div id="result_order" class="result_order"></div>';
$search_bar .= '<input id="keywords" name="keywords"';
if (!isset($config['search_keywords'])) {
$search_bar .= "value='".__('Enter keywords to search')."'";
@ -408,6 +407,27 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
$modal_box .= '<a href="https://discord.com/invite/xVt2ruSxmr" target="_blank">'.__('Join discord community').'</a>';
$modal_box .= '</div>';
// Move help modal (header) fix z-index.
$modal_box .= '
<script>
$(document).ready(function() {
let helpModalIcon = $("#modal-help-content > img");
let helpModal = $("#modal_help");
if (helpModalIcon.length > 0) {
let distanceRight =
$(window).width() - (helpModalIcon.offset().left + helpModalIcon.width());
helpModal.css("z-index", "3");
helpModal.css("position", "fixed");
helpModal.css("top", "16px");
helpModal.css("right", `${Math.floor(distanceRight) + 34}px`);
helpModal.appendTo(document.body);
}
});
</script>
';
if ($config['activate_feedback'] === '1') {
$modal_help = html_print_div(
[
@ -599,21 +619,12 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
function filter_notification() {
let notification_type = '';
$('.notification-item').hide();
$(".checkbox_filter_notifications:checkbox:checked").each(function() {
notification_type = $(this).val();
console.log(notification_type);
$('.notification-item[value='+notification_type+']').show();
if (notification_type == 'All'){
$('.notification-item').show();
}
});
notification_type = $("#notifications_filter_options").val()
if (notification_type == 'All'){
if (notification_type === 'All') {
$('.notification-item').show();
}
if (notification_type == ''){
$('.notification-item').hide();
} else {
$('.notification-item[value='+notification_type+']').show();
}
}
@ -892,7 +903,8 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
enterprise: <?php echo (int) enterprise_installed(); ?>,
},
success: function (data) {
$('#result_order').html(data);
$('#result_order').html(data);
resizeSearchHeader()
},
error: function (data) {
console.error("Fatal error in AJAX call to interpreter order", data)
@ -1058,8 +1070,10 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
})
}
},
closeOnEscape: true,
onload: () => {
$(document).ready(function () {
$(".ui-dialog-titlebar-close").hide();
var buttonpane = $("div[aria-describedby='welcome_modal_window'] .ui-dialog-buttonpane.ui-widget-content.ui-helper-clearfix");
$(buttonpane).append(`
<div class="welcome-wizard-buttons">
@ -1215,4 +1229,8 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
});
});
/* ]]> */
$(window).resize(function () {
resizeSearchHeader()
});
</script>

View File

@ -558,7 +558,7 @@ if ($broker === false) {
$tableAgent->data['caption_interval'][0] = __('Interval').ui_print_help_tip(__('Time that elapses when updating data in the agent. Remote modules have their own interval, but this time is used to find out if an agent stopped responding (unknown state). When twice the time interval defined in an agent goes by, it is considered to be in unknown state (or also if all its remote modules are in unknown state). An agent may be in unknown state if all of its local (software agent-based) modules have a last contact time longer than twice the agent interval, even if it has updated remote modules.'), true);
// $tableAgent->rowstyle['interval'] = 'width: 260px';
$tableAgent->rowclass['interval'] = 'w540px';
$tableAgent->data['interval'][0] = html_print_extended_select_for_time(
$tableAgent->data['interval'][0] = html_print_select_agentmodule_interval(
'intervalo',
$intervalo,
'',
@ -936,7 +936,7 @@ $switchButtons[] = html_print_radio_button_extended(
);
$tableAdvancedAgent->data['module_definition'][] = html_print_label_input_block(
__('Module definition').ui_print_help_tip(__('Three working modes can be selected for module definition. Learning mode: Default mode, if an XML arrives with new modules, they will be created automatically; it is a learning behavior. Normal mode: If an XML arrives with new modules, they will only be created if they are previously declared in the Console. Autodisable mode: It is the same as learning mode, but if all modules go into unknown, the agent will be disabled until information arrives again.'), true),
__('Module definition').ui_print_help_tip(__('Three working modes can be selected for module definition. Learning mode: Default mode, if an XML arrives with new modules, they will be created automatically; it is a learning behavior. Normal mode: If an XML arrives with new modules, they will only be created if they are previously declared in the Console. Autodisable mode: It is the same as learning mode, but if all modules go into unknown, the agent will be disabled until information arrives again.'), true).clippy_context_help('modules_not_learning_mode'),
html_print_div(
[
'class' => 'switch_radio_button',
@ -1297,7 +1297,6 @@ if ($modo == 0) {
echo "<span id='modules_not_learning_mode_context_help' class='invisible'>";
}
echo clippy_context_help('modules_not_learning_mode');
echo '</span>';
if ($new_agent === false) {
@ -1434,15 +1433,15 @@ ui_require_jquery_file('bgiframe');
function show_modules_not_learning_mode_context_help() {
if ($("input[name='modo'][value=0]").is(':checked')) {
$("#modules_not_learning_mode_context_help").show().css('padding-right','8px');
}
else {
$("#modules_not_learning_mode_context_help").hide();
$(".div-modules_not_learning_mode").show();
} else {
$(".div-modules_not_learning_mode").hide();
}
}
$(document).ready (function() {
show_modules_not_learning_mode_context_help();
var $id_agent = '<?php echo $id_agente; ?>';
var previous_primary_group_select;

View File

@ -1292,10 +1292,18 @@ if ($update_agent) {
// Get all plugins (BASIC OPTIONS).
$agent = new PandoraFMS\Agent($id_agente);
$plugins = $agent->getPlugins();
$pluginsToWrite = [
'security_hardening' => [
'write' => $security_hardening,
'raw' => "module_begin \nmodule_plugin /usr/share/pandora_agent/plugins/pandora_hardening -t 150 \nmodule_absoluteinterval 7d \nmodule_end",
],
];
foreach ($plugins as $key => $row) {
// Only check plugins when agent package is bigger than 774.
if ($options_package === '1') {
if (preg_match('/pandora_hardening/', $row['raw']) === 1) {
$pluginsToWrite['security_hardening']['write'] = 0;
if ($security_hardening === 1) {
if ($row['disabled'] === 1) {
$agent->enablePlugins($row['raw']);
@ -1347,6 +1355,12 @@ if ($update_agent) {
}
}
foreach ($pluginsToWrite as $name => $val) {
if ($val['write'] === 1) {
$result = $agent->addPlugins(io_safe_output($val['raw']), true);
}
}
$modules = $agent->getModules();
foreach ($modules as $key => $row) {
@ -1487,6 +1501,11 @@ if ($update_module === true || $create_module === true) {
$min = (int) get_parameter('min');
$max = (int) get_parameter('max');
$interval = (int) get_parameter('module_interval', $intervalo);
// Limit module interval to at least 60 secs.
if ($interval > 0) {
$interval = max($interval, 60);
}
$ff_interval = (int) get_parameter('module_ff_interval');
$quiet_module = (int) get_parameter('quiet_module');
$cps_module = (int) get_parameter('cps_module');
@ -1514,6 +1533,7 @@ if ($update_module === true || $create_module === true) {
$old_configuration_data = (string) get_parameter('old_configuration_data');
$new_configuration_data = '';
$custom_string_1_default = '';
$custom_string_2_default = '';
$custom_string_3_default = '';
@ -1979,6 +1999,19 @@ if ($update_module) {
}
}
$def_msg = __('There was a problem updating module. Processing error');
if (preg_match('/module_type\s+([^\\n]+)/', io_safe_output($configuration_data), $matches)) {
$config_module_type = $matches[1];
$type_id = (int) db_get_value('id_tipo', 'ttipo_modulo', 'nombre', $config_module_type);
if ($type_id !== $id_module_type) {
$def_msg = __('There was a problem updating module: module type cannot be edited');
$result = ERR_GENERIC;
}
}
if (is_error($result) === true) {
switch ($result) {
case ERR_EXIST:
@ -1996,7 +2029,7 @@ if ($update_module) {
case ERR_DB:
case ERR_GENERIC:
default:
$msg = __('There was a problem updating module. Processing error');
$msg = $def_msg;
break;
}
@ -2397,10 +2430,7 @@ if ($delete_module) {
if ($error != 0) {
ui_print_error_message(__('There was a problem deleting the module'));
} else {
echo '<script type="text/javascript">
location="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module&id_agente='.$id_agente.'";
alert("'.__('Module deleted succesfully').'");
</script>';
ui_print_success_message(__('Module deleted succesfully'));
$agent = db_get_row('tagente', 'id_agente', $id_agente);
db_pandora_audit(

View File

@ -318,7 +318,7 @@ $filterTable->data[0][0] = html_print_label_input_block(
$return_all_group,
'ag_group',
$ag_group,
'this.form.submit();',
'',
'',
0,
true,
@ -337,7 +337,7 @@ $filterTable->data[0][1] = html_print_label_input_block(
$recursion,
true,
false,
'this.form.submit()'
''
).'</div>'
);
@ -347,7 +347,7 @@ $filterTable->data[0][2] = html_print_label_input_block(
$showAgentFields,
'disabled',
$disabled,
'this.form.submit()',
'',
'',
0,
true,
@ -365,7 +365,7 @@ $filterTable->data[0][3] = html_print_label_input_block(
$fields,
'os',
$os,
'this.form.submit()',
'',
'All',
0,
true,

View File

@ -662,13 +662,16 @@ if ($modules !== false) {
$table->width = '100%';
$table->class = 'tactical_table info_table';
$table->head = [];
$table->head['checkbox'] = html_print_checkbox(
'all_delete',
0,
false,
true,
false
);
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === true) {
$table->head['checkbox'] = html_print_checkbox(
'all_delete',
0,
false,
true,
false
);
}
$table->head[0] = '<span>'.__('Name').'</span>'.ui_get_sorting_arrows(
$url_name.'up',
$url_name.'down',
@ -909,23 +912,30 @@ if ($modules !== false) {
if ((bool) $linked !== false) {
if ((bool) $adopt === true) {
$img = 'images/policies_brick.png';
$img = 'images/policies_brick.svg';
$title = '('.__('Adopted').') '.$policyInfo['name_policy'];
} else {
$img = 'images/policies_mc.png';
$img = 'images/policy@svg.svg';
$title = $policyInfo['name_policy'];
}
} else {
if ((bool) $adopt === true) {
$img = 'images/policies_not_brick.png';
$img = 'images/policies_not_brick.svg';
$title = '('.__('Unlinked').') ('.__('Adopted').') '.$policyInfo['name_policy'];
} else {
$img = 'images/unlinkpolicy.png';
$img = 'images/unlinkpolicy.svg';
$title = '('.__('Unlinked').') '.$policyInfo['name_policy'];
}
}
$data[1] = '<a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&id='.$policyInfo['id_policy'].'">'.html_print_image($img, true, ['title' => $title]).'</a>';
$data[1] = '<a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&id='.$policyInfo['id_policy'].'">'.html_print_image(
$img,
true,
[
'title' => $title,
'class' => 'main_menu_icon',
]
).'</a>';
}
}
@ -1198,7 +1208,7 @@ $createModuleTable->data[1][] = html_print_label_input_block(
html_print_anchor(
[
'href' => 'https://pandorafms.com/Library/Library/',
'class' => 'color-black-grey invert_filter',
'class' => 'color-black-grey',
'content' => __('Get more modules on Monitoring Library'),
],
true
@ -1262,23 +1272,11 @@ html_print_div(
$('#modal').dialog("close");
});
$('[id^=checkbox-id_delete]').change(function(){
if($(this).parent().parent().hasClass('checkselected')){
$(this).parent().parent().removeClass('checkselected');
}
else{
$(this).parent().parent().addClass('checkselected');
}
});
$('[id^=checkbox-all_delete]').change(function(){
if ($("#checkbox-all_delete").prop("checked")) {
$('[id^=checkbox-id_delete]').parent().parent().addClass('checkselected');
$("[name^=id_delete").prop("checked", true);
}
else{
$('[id^=checkbox-id_delete]').parent().parent().removeClass('checkselected');
$("[name^=id_delete").prop("checked", false);
}
});
@ -1367,4 +1365,9 @@ html_print_div(
}
$(document).ready(function () {
$('#module_action').select2('open');
$('#module_action').select2('close');
});
</script>

View File

@ -442,7 +442,7 @@ $tableBasicThresholds->rowclass = [];
$tableBasicThresholds->data = [];
// WARNING THRESHOLD.
$tableBasicThresholds->rowclass['caption_warning_threshold'] = 'field_half_width pdd_t_10px';
$tableBasicThresholds->rowclass['caption_warning_threshold'] = 'field_half_width';
$tableBasicThresholds->rowclass['warning_threshold'] = 'field_half_width';
$tableBasicThresholds->data['caption_warning_threshold'][0] .= __('Warning threshold').'&nbsp;';
@ -617,7 +617,7 @@ $tableBasicThresholds->data['critical_threshold'][0] .= html_print_input_text(
$classdisabledBecauseInPolicy
);
$table_simple->rowstyle['thresholds_table'] = 'margin-top: 15px;height: 400px;width: 100%';
$table_simple->rowstyle['thresholds_table'] = 'margin-top: 15px;height: 450px;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) {
@ -705,7 +705,19 @@ if ((int) $moduletype === MODULE_DATA) {
// 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);
$outputExecutionInterval = html_print_select_agentmodule_interval(
'module_interval',
$interval,
'',
'',
'0',
false,
true,
false,
false,
$classdisabledBecauseInPolicy,
$disabledBecauseInPolicy
);
}
$module_id_policy_module = 0;
@ -884,7 +896,7 @@ $tagsAvailableData .= html_print_image(
[
'id' => 'right',
'title' => __('Add tags to module'),
'class' => 'main_menu_icon invert_filter clickable mrgn_lft_5px',
'class' => 'main_menu_icon invert_filter clickable mrgn_lft_5px black-and-white',
]
);

View File

@ -712,9 +712,9 @@ foreach ($simple_alerts as $alert) {
WHERE id = '.$alert['id_alert_template']
);
if ($default_action != '') {
$data[3] .= "<tr><td colspan='2'><ul class='action_list'><li>";
$data[3] .= "<tr><td colspan='2'>";
$data[3] .= db_get_sql("SELECT name FROM talert_actions WHERE id = $default_action").' <em>('.__('Default').')</em>';
$data[3] .= '</li></ul></td>';
$data[3] .= '</td>';
$data[3] .= '</tr>';
}
@ -722,7 +722,7 @@ foreach ($simple_alerts as $alert) {
$data[3] .= '<tr class="alert_action_list">';
$data[3] .= '<td>';
$data[3] .= '<ul class="action_list inline_line">';
$data[3] .= '<li class="inline_line">';
$data[3] .= '<li class="">';
if ($alert['disabled']) {
$data[3] .= '<font class="action_name italic_a">';
} else {
@ -758,7 +758,7 @@ foreach ($simple_alerts as $alert) {
$data[3] .= '</td>';
$data[3] .= '<td class="flex_center">';
$data[3] .= '<td class="flex_center table_action_buttons">';
$data[3] .= ui_print_help_tip(__('The default actions will be executed every time that the alert is fired and no other action is executed'), true);
// Is possible manage actions if have LW permissions in the agent group of the alert module
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'LW')) {
@ -786,7 +786,7 @@ foreach ($simple_alerts as $alert) {
true,
[
'title' => __('Update action'),
'class' => 'main_menu_icon invert_filter',
'class' => 'main_menu_icon invert_filter action_button_hidden',
'onclick' => 'show_display_update_action(\''.$action['id'].'\',\''.$alert['id'].'\',\''.$alert['id_agent_module'].'\',\''.$action_id.'\',\''.$alert['id_agent_module'].'\')',
]
);
@ -997,7 +997,7 @@ foreach ($simple_alerts as $alert) {
} else {
$module_linked = policies_is_module_linked($alert['id_agent_module']);
if ($module_linked === '0') {
$img = 'images/unlinkpolicy.png';
$img = 'images/unlinkpolicy.svg';
} else {
$img = 'images/policy@svg.svg';
}
@ -1333,10 +1333,9 @@ function show_display_update_action(id_module_action, alert_id, alert_id_agent_m
},
open: function() {
$(`#update_action-div-${alert_id}`).css('overflow', 'hidden');
//$(`#action_select_ajax-${alert_id}`).select2({
// tags: true,
// dropdownParent: $(`#update_action-div-${alert_id}`)
//});
$(`#update_action-div-${alert_id} select`).select2({
dropdownParent: $(this).parent()
});
},
width: 600,
height: 350

View File

@ -140,13 +140,16 @@ if (enterprise_installed() && $alert['id_policy_alerts'] != 0) {
if ($policyInfo === false) {
$policy = __('N/A');
} else {
$img = 'images/policies_mc.png';
$img = 'images/policy@svg.svg';
$policy = '<a href="?sec=gmodules&amp;sec2=enterprise/godmode/policies/policies&amp;id='.$policyInfo['id'].'">';
$policy .= html_print_image(
$img,
true,
['title' => $policyInfo['name']]
[
'title' => $policyInfo['name'],
'class' => 'main_menu_icon',
]
);
$policy .= '</a>';
}

View File

@ -350,7 +350,8 @@ function update_template($step)
'previous_name' => $previous_name,
];
if ($name_check === false) {
$original_name = db_get_value('name', 'talert_templates', 'id', $id);
if ($name_check === false || $original_name === $name_check) {
$result = alerts_update_alert_template($id, $values);
} else {
ui_print_warning_message(__('Another template with the same name already exists'));
@ -1821,5 +1822,11 @@ if ($step == 2) {
}
?>
})
$(document).ready(function () {
$("#default_action").select2({
closeOnSelect: true
});
});
/* ]]> */
</script>

View File

@ -58,7 +58,6 @@ if ($id_group > 0) {
$alerts_disabled = $group['disabled'];
$custom_id = $group['custom_id'];
$propagate = $group['propagate'];
$skin = $group['id_skin'];
$contact = $group['contact'];
$other = $group['other'];
$description = $group['description'];
@ -80,7 +79,6 @@ if ($id_group > 0) {
$alerts_disabled = 0;
$custom_id = '';
$propagate = 0;
$skin = 0;
$contact = '';
$other = '';
$description = '';
@ -261,12 +259,12 @@ $table->data[3][1] = html_print_label_input_block(
$table->data[4][0] = html_print_label_input_block(
__('Contact').ui_print_help_tip(__('Contact information accessible through the _groupcontact_ macro'), true),
html_print_textarea('contact', 4, 40, $contact, "class='min-height-0px'", true)
html_print_input_text('contact', $contact, '', false, '', true)
);
$table->data[4][1] = html_print_label_input_block(
__('Other').ui_print_help_tip(__('Information accessible through the _group_other_ macro'), true),
html_print_textarea('other', 4, 40, $other, "class='min-height-0px'", true)
html_print_input_text('other', $other, '', false, '', true)
);
$table->data[5][0] = html_print_label_input_block(

View File

@ -439,7 +439,6 @@ if ($is_management_allowed === true
$group_pass = (string) get_parameter('group_pass');
$alerts_disabled = (bool) get_parameter('alerts_disabled');
$custom_id = (string) get_parameter('custom_id');
$skin = (string) get_parameter('skin');
$description = (string) get_parameter('description');
$contact = (string) get_parameter('contact');
$other = (string) get_parameter('other');
@ -462,7 +461,6 @@ if ($is_management_allowed === true
'parent' => $id_parent,
'disabled' => $alerts_disabled,
'custom_id' => $custom_id,
'id_skin' => $skin,
'description' => $description,
'contact' => $contact,
'propagate' => $propagate,
@ -498,7 +496,6 @@ if ($is_management_allowed === true && $update_group === true) {
$alerts_enabled = (bool) get_parameter('alerts_enabled');
$custom_id = (string) get_parameter('custom_id');
$propagate = (bool) get_parameter('propagate');
$skin = (string) get_parameter('skin');
$description = (string) get_parameter('description');
$contact = (string) get_parameter('contact');
$other = (string) get_parameter('other');
@ -530,7 +527,6 @@ if ($is_management_allowed === true && $update_group === true) {
'parent' => ($id_parent == -1) ? 0 : $id_parent,
'disabled' => !$alerts_enabled,
'custom_id' => $custom_id,
'id_skin' => $skin,
'description' => $description,
'contact' => $contact,
'propagate' => $propagate,
@ -727,6 +723,11 @@ if ($is_management_allowed === true
['id_grupo' => $id_group]
);
$result_user_profile = db_process_sql_delete(
'tusuario_perfil',
['id_grupo' => $id_group]
);
if ($result && (!$usedGroup['return'])) {
db_process_sql_delete(
'tfavmenu_user',
@ -1132,7 +1133,7 @@ if ($tab == 'tree') {
$confirm_message = __('The child groups will be updated to use the parent id of the deleted group').'. '.$confirm_message;
}
$table->data[$key][6] .= '<a href="'.$url_delete.'" onClick="if (!confirm(\' '.$confirm_message.'\')) return false;">'.html_print_image(
$table->data[$key][6] .= '<a href="'.$url_delete.'" onClick="event.preventDefault(); return preprocessDeletion('.$group['id_grupo'].', \''.$url_delete.'\',\''.$confirm_message.'\');">'.html_print_image(
'images/delete.svg',
true,
[
@ -1218,7 +1219,6 @@ $tab = 'group_edition';
});
$('#button-filter').on('click', function(event) {
console.log('here');
event.preventDefault();
load_tree(show_full_hirearchy, show_not_init_agents, show_not_init_modules);
@ -1318,5 +1318,39 @@ $tab = 'group_edition';
});
}
function preprocessDeletion(group_id, delete_URL, confirm_text) {
var parameters = {};
parameters['page'] = 'include/ajax/group';
parameters['method'] = 'checkGroupIsLinkedToElement';
parameters['group_id'] = group_id;
parameters['table_name'] = 'tusuario_perfil';
parameters['field_name'] = 'id_grupo';
$.ajax({
type: "POST",
url: "<?php echo ui_get_full_url('ajax.php', false, false, false); ?>",
data: parameters,
success: function(data) {
if (data.result == '1') {
confirmDialog({
title: '<?php echo __('Are you sure?'); ?>',
message: '<?php echo __('There are user profiles assigned to this group which will be deleted. Note that a user with no associated profiles will not be able to log in. Please ensure you want to proceed with the deletion.'); ?>',
onAccept: function() {
window.location.assign(delete_URL);
}
});
} else {
if (!confirm(confirm_text)) {
return false;
} else {
window.location.assign(delete_URL);
}
}
},
dataType: "json"
});
return true;
}
</script>

View File

@ -131,6 +131,10 @@ if ($update_agents) {
) {
if (get_parameter('interval') != -2) {
$values['intervalo'] = get_parameter('interval');
if ($values['intervalo'] < 60) {
$values['intervalo'] = 60;
}
}
}
@ -628,7 +632,7 @@ if (is_metaconsole() === true) {
$url = 'index.php?sec=advanced&sec2=advanced/massive_operations&tab=massive_agents&pure=0&option=edit_agents';
}
echo '<form method="post" autocomplete="off" id="form_agent" action="'.$url.'">';
echo '<form method="post" autocomplete="off" id="form_agent" class="form-agent-bulk-operation" action="'.$url.'">';
echo html_print_avoid_autocomplete();
$params = [
'id_group' => ($id_group ?? ''),
@ -651,14 +655,11 @@ echo '<div id="form_agents" style="display:none">';
$table = new StdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->class = 'databox filters filter-table-adv';
$table->head = [];
$table->style = [];
$table->style[0] = 'font-weight: bold; width: 150px;';
$table->size[0] = '15%';
$table->size[1] = '35%';
$table->size[2] = '15%';
$table->size[3] = '35%';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data = [];
@ -683,7 +684,6 @@ if (is_metaconsole() === false) {
$modules_values[$m['id_module']] = $m['name'];
}
$table->data[0][0] = __('Parent');
$params = [];
$params['return'] = true;
$params['show_helptip'] = true;
@ -694,90 +694,107 @@ if (is_metaconsole() === false) {
$params['value'] = db_get_value('alias', 'tagente', 'id_agente', $id_parent);
$params['selectbox_id'] = 'cascade_protection_module';
$params['javascript_is_function_select'] = true;
$table->data[0][1] = ui_print_agent_autocomplete_input($params);
$table->data[0][1] .= '<b>'.__('Cascade protection').'</b>';
$table->data[0][1] .= html_print_select(
[
1 => __('Yes'),
0 => __('No'),
],
'cascade_protection',
-1,
'',
__('No change'),
-1,
true
$table->data[0][0] = html_print_label_input_block(
__('Parent'),
ui_print_agent_autocomplete_input($params)
);
$table->data[0][1] .= '&nbsp;&nbsp;'.__('Module').'&nbsp;';
$table->data[0][1] .= html_print_select(
($modules ?? ''),
'cascade_protection_module',
($cascade_protection_module ?? ''),
'',
'',
0,
true
$table->data[0][1] = html_print_label_input_block(
__('Cascade protection'),
'<div class="flex-row-center">'.html_print_select(
[
1 => __('Yes'),
0 => __('No'),
],
'cascade_protection',
-1,
'',
__('No change'),
-1,
true,
false,
true,
'w50p',
false,
'width: 48%;'
).'<div class="flex-row-center mrgn_lft_20px">'.__('Module').'&nbsp;&nbsp;&nbsp;'.html_print_select(
($modules ?? ''),
'cascade_protection_module',
($cascade_protection_module ?? ''),
'',
'',
0,
true,
false,
true,
'',
false,
'width: 100%;'
).'</div></div>'
);
}
$table->data[1][0] = __('Group');
$table->data[1][1] = '<div class="w290px inline">';
$table->data[1][1] .= html_print_select_groups(
false,
'AR',
false,
'group',
$group,
'',
__('No change'),
-1,
true,
false,
true,
'',
false,
'width: 150px;'
);
$table->data[1][1] .= '</div>';
$table->data[2][0] = __('Interval');
$table->data[2][1] = html_print_extended_select_for_time(
'interval',
-2,
'',
'',
'0',
10,
true,
'width: 150px',
false,
'',
false,
false,
'',
true
$table->data[1][0] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
false,
'AR',
false,
'group',
$group,
'',
__('No change'),
-1,
true,
false,
true,
'',
false
)
);
$table->data[3][0] = __('OS');
$table->data[3][1] = html_print_select_from_sql(
'SELECT id_os, name FROM tconfig_os',
'id_os',
$id_os,
'',
__('No change'),
-1,
true,
false,
true,
false,
'width: 105px;'
$table->data[1][1] = html_print_label_input_block(
__('Interval'),
html_print_select_agentmodule_interval(
'interval',
-2,
'',
'',
'0',
10,
true,
false,
false,
'',
false,
false,
'',
true
)
);
$os_preview = ' <span id="os_preview" class="mrgn_lft_10px">';
$os_preview .= ui_print_os_icon($id_os, false, true);
$os_preview .= '</span>';
$table->data[2][0] = html_print_label_input_block(
__('OS'),
'<div class="flex-row-center">'.html_print_select_from_sql(
'SELECT id_os, name FROM tconfig_os',
'id_os',
$id_os,
'',
__('No change'),
-1,
true,
false,
true,
false,
'width: 100%;'
).$os_preview.'</div>'
);
$table->data[3][1] .= ' <span id="os_preview">';
$table->data[3][1] .= ui_print_os_icon($id_os, false, true);
$table->data[3][1] .= '</span>';
// Network server.
$none = '';
@ -785,31 +802,34 @@ if ($server_name == '' && $id_agente) {
$none = __('None');
}
$table->data[4][0] = __('Server');
$table->data[4][1] = html_print_select(
servers_get_names(),
'server_name',
$server_name,
'',
__('No change'),
-1,
true,
false,
true,
'',
false,
'width: 150px;'
$table->data[2][1] = html_print_label_input_block(
__('Server'),
html_print_select(
servers_get_names(),
'server_name',
$server_name,
'',
__('No change'),
-1,
true,
false,
true,
'',
false
)
);
// Description.
$table->data[5][0] = __('Description');
$table->data[5][1] = html_print_input_text(
'description',
$description,
'',
45,
255,
true
$table->data[3][0] = html_print_label_input_block(
__('Description'),
html_print_input_text(
'description',
$description,
'',
45,
255,
true
)
);
html_print_table($table);
@ -827,12 +847,10 @@ $quiet_select = -1;
$table = new StdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->class = 'databox filters filter-table-adv';
$table->size[0] = '15%';
$table->size[1] = '35%';
$table->size[2] = '15%';
$table->size[3] = '35%';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->head = [];
$table->style = [];
@ -840,76 +858,81 @@ $table->style[0] = 'font-weight: bold; width: 150px;';
$table->data = [];
// Custom ID.
$table->data[0][0] = __('Custom ID');
$table->data[0][1] = html_print_input_text(
'custom_id',
$custom_id,
'',
16,
255,
true
$table->data[0][0] = html_print_label_input_block(
__('Custom ID'),
html_print_input_text(
'custom_id',
$custom_id,
'',
16,
255,
true
)
);
// Secondary Groups.
if (enterprise_installed() === true) {
$groups = users_get_groups($config['id_user'], 'AW', false);
$table->data['secondary_groups_added'][0] = __('Add secondary groups');
$table->data['secondary_groups_added'][1] = html_print_select(
$groups,
'secondary_groups_added[]',
0,
false,
'',
'',
true,
true,
true,
'',
false,
'min-width: 500px; max-width: 500px; max-height: 100px',
false,
false,
false,
'',
false,
false,
false,
false,
true,
true
$table->data[1][0] = html_print_label_input_block(
__('Add secondary groups'),
html_print_select(
$groups,
'secondary_groups_added[]',
0,
false,
'',
'',
true,
true,
true,
'',
false,
'min-width: 500px; max-width: 500px; max-height: 100px',
false,
false,
false,
'',
false,
false,
false,
false,
true,
true
)
);
$table->data['secondary_groups_removed'][0] = __('Remove secondary groups');
$table->data['secondary_groups_removed'][1] = html_print_select(
$groups,
'secondary_groups_removed[]',
0,
false,
'',
'',
true,
true,
true,
'',
false,
'min-width: 500px; max-width: 500px; max-height: 100px',
false,
false,
false,
'',
false,
false,
false,
false,
true,
true
$table->data[1][1] = html_print_label_input_block(
__('Remove secondary groups'),
html_print_select(
$groups,
'secondary_groups_removed[]',
0,
false,
'',
'',
true,
true,
true,
'',
false,
'min-width: 500px; max-width: 500px; max-height: 100px',
false,
false,
false,
'',
false,
false,
false,
false,
true,
true
)
);
}
// Learn mode / Normal mode.
$table->data[1][0] = __('Module definition');
$table->data[1][1] = __('No change').' ';
$table->data[1][1] .= html_print_radio_button_extended(
$module_definition = __('No change').' ';
$module_definition .= html_print_radio_button_extended(
'mode',
-1,
'',
@ -919,8 +942,8 @@ $table->data[1][1] .= html_print_radio_button_extended(
'class="mrgn_right_40px"',
true
);
$table->data[1][1] .= __('Learning mode').' ';
$table->data[1][1] .= html_print_radio_button_extended(
$module_definition .= __('Learning mode').' ';
$module_definition .= html_print_radio_button_extended(
'mode',
1,
'',
@ -930,8 +953,8 @@ $table->data[1][1] .= html_print_radio_button_extended(
'class="mrgn_right_40px"',
true
);
$table->data[1][1] .= __('Normal mode').' ';
$table->data[1][1] .= html_print_radio_button_extended(
$module_definition .= __('Normal mode').' ';
$module_definition .= html_print_radio_button_extended(
'mode',
0,
'',
@ -941,8 +964,8 @@ $table->data[1][1] .= html_print_radio_button_extended(
'class="mrgn_right_40px"',
true
);
$table->data[1][1] .= __('Autodisable mode').' ';
$table->data[1][1] .= html_print_radio_button_extended(
$module_definition .= __('Autodisable mode').' ';
$module_definition .= html_print_radio_button_extended(
'mode',
2,
'',
@ -953,10 +976,14 @@ $table->data[1][1] .= html_print_radio_button_extended(
true
);
$table->data[2][0] = html_print_label_input_block(
__('Module definition'),
'<div class="flex-row-center">'.$module_definition.'</div>'
);
// Status (Disabled / Enabled).
$table->data[2][0] = __('Status');
$table->data[2][1] = __('No change').' ';
$table->data[2][1] .= html_print_radio_button_extended(
$status_item = __('No change').' ';
$status_item .= html_print_radio_button_extended(
'disabled',
-1,
'',
@ -966,12 +993,12 @@ $table->data[2][1] .= html_print_radio_button_extended(
'class="mrgn_right_40px"',
true
);
$table->data[2][1] .= __('Disabled').' ';
$table->data[2][1] .= ui_print_help_tip(
$status_item .= __('Disabled').' ';
$status_item .= ui_print_help_tip(
__('If the remote configuration is enabled, it will also go into standby mode when disabling it.'),
true
).' ';
$table->data[2][1] .= html_print_radio_button_extended(
$status_item .= html_print_radio_button_extended(
'disabled',
1,
'',
@ -981,8 +1008,8 @@ $table->data[2][1] .= html_print_radio_button_extended(
'class="mrgn_right_40px"',
true
);
$table->data[2][1] .= __('Active').' ';
$table->data[2][1] .= html_print_radio_button_extended(
$status_item .= __('Active').' ';
$status_item .= html_print_radio_button_extended(
'disabled',
0,
'',
@ -993,15 +1020,19 @@ $table->data[2][1] .= html_print_radio_button_extended(
true
);
$table->data[2][1] = html_print_label_input_block(
__('Status'),
'<div class="flex-row-center">'.$status_item.'</div>'
);
// Remote configuration.
$table->data[3][0] = __('Remote configuration');
// Delete remote configuration.
$table->data[3][1] = '<div id="delete_configurations" class="invisible">';
$table->data[3][1] .= __('Delete available remote configurations');
$table->data[3][1] .= ' (';
$table->data[3][1] .= '<span id="n_configurations"></span>';
$table->data[3][1] .= ') ';
$table->data[3][1] .= html_print_checkbox_extended(
$remote_config = '<div id="delete_configurations" class="invisible">';
$remote_config .= __('Delete available remote configurations');
$remote_config .= ' (';
$remote_config .= '<span id="n_configurations"></span>';
$remote_config .= ') ';
$remote_config .= html_print_checkbox_extended(
'delete_conf',
1,
0,
@ -1010,11 +1041,16 @@ $table->data[3][1] .= html_print_checkbox_extended(
'class="mrgn_right_40px"',
true
);
$table->data[3][1] .= '</div>';
$remote_config .= '</div>';
$table->data[3][1] .= '<div id="not_available_configurations" class="invisible"><em>';
$table->data[3][1] .= __('Not available');
$table->data[3][1] .= '</em></div>';
$remote_config .= '<div id="not_available_configurations" class="invisible"><em>';
$remote_config .= __('Not available');
$remote_config .= '</em></div>';
$table->data[3][0] = html_print_label_input_block(
__('Remote configuration'),
'<div class="flex-row-center">'.$remote_config.'</div>'
);
$listIcons = gis_get_array_list_icons();
@ -1042,8 +1078,7 @@ if ($icon_path == '') {
$path_warning = $path.$icon_path.'.warning.png';
}
$table->data[4][0] = __('Agent icon');
$table->data[4][1] = html_print_select(
$agent_icon = html_print_select(
$arraySelectIcon,
'icon_path',
$icon_path,
@ -1052,9 +1087,9 @@ $table->data[4][1] = html_print_select(
'',
true
);
$table->data[4][1] .= '&nbsp;';
$table->data[4][1] .= __('Without status').': ';
$table->data[4][1] .= html_print_image(
$agent_icon .= '&nbsp;';
$agent_icon .= __('Without status').': ';
$agent_icon .= html_print_image(
$path_without,
true,
[
@ -1062,8 +1097,8 @@ $table->data[4][1] .= html_print_image(
'style' => 'display:'.$display_icons.';',
]
);
$table->data[4][1] .= '&nbsp;'.__('Default').': ';
$table->data[4][1] .= html_print_image(
$agent_icon .= '&nbsp;'.__('Default').': ';
$agent_icon .= html_print_image(
$path_default,
true,
[
@ -1071,8 +1106,8 @@ $table->data[4][1] .= html_print_image(
'style' => 'display:'.$display_icons.';',
]
);
$table->data[4][1] .= '&nbsp;'.__('Ok').': ';
$table->data[4][1] .= html_print_image(
$agent_icon .= '&nbsp;'.__('Ok').': ';
$agent_icon .= html_print_image(
$path_ok,
true,
[
@ -1080,8 +1115,8 @@ $table->data[4][1] .= html_print_image(
'style' => 'display:'.$display_icons.';',
]
);
$table->data[4][1] .= '&nbsp;'.__('Bad').': ';
$table->data[4][1] .= html_print_image(
$agent_icon .= '&nbsp;'.__('Bad').': ';
$agent_icon .= html_print_image(
$path_bad,
true,
[
@ -1089,8 +1124,8 @@ $table->data[4][1] .= html_print_image(
'style' => 'display:'.$display_icons.';',
]
);
$table->data[4][1] .= '&nbsp;'.__('Warning').': ';
$table->data[4][1] .= html_print_image(
$agent_icon .= '&nbsp;'.__('Warning').': ';
$agent_icon .= html_print_image(
$path_warning,
true,
[
@ -1099,10 +1134,14 @@ $table->data[4][1] .= html_print_image(
]
);
$table->data[3][1] = html_print_label_input_block(
__('Agent icon'),
'<div class="flex-row-center">'.$agent_icon.'</div>'
);
if ($config['activate_gis']) {
$table->data[5][0] = __('Ignore new GIS data:');
$table->data[5][1] = __('No change').' ';
$table->data[5][1] .= html_print_radio_button_extended(
$ignore_gis = __('No change').' ';
$ignore_gis .= html_print_radio_button_extended(
'update_gis_data',
-1,
'',
@ -1112,8 +1151,8 @@ if ($config['activate_gis']) {
'class="mrgn_right_40px"',
true
);
$table->data[5][1] .= __('Yes').' ';
$table->data[5][1] .= html_print_radio_button_extended(
$ignore_gis .= __('Yes').' ';
$ignore_gis .= html_print_radio_button_extended(
'update_gis_data',
0,
'',
@ -1123,8 +1162,8 @@ if ($config['activate_gis']) {
'class="mrgn_right_40px"',
true
);
$table->data[5][1] .= __('No').' ';
$table->data[5][1] .= html_print_radio_button_extended(
$ignore_gis .= __('No').' ';
$ignore_gis .= html_print_radio_button_extended(
'update_gis_data',
1,
'',
@ -1134,74 +1173,82 @@ if ($config['activate_gis']) {
'class="mrgn_right_40px"',
true
);
$table->data[4][0] = html_print_label_input_block(
__('Ignore new GIS data:'),
'<div class="flex-row-center">'.$ignore_gis.'</div>'
);
}
$table->data[6][0] = __('Quiet');
$table->data[6][0] .= ui_print_help_tip(
__('The agent still runs but the alerts and events will be stop'),
true
);
$table->data[6][1] = html_print_select(
[
-1 => __('No change'),
1 => __('Yes'),
0 => __('No'),
],
'quiet_select',
$quiet_select,
'',
'',
0,
true
);
$table->data[7][0] = __('Safe operation mode').': '.ui_print_help_tip(
__(
'This mode allow %s to disable all modules of this agent while the selected module is on CRITICAL status',
get_product_name()
$table->data[5][0] = html_print_label_input_block(
__('Quiet:').ui_print_help_tip(
__('The agent still runs but the alerts and events will be stop'),
true
),
true
);
$table->data[7][1] = html_print_select(
[
1 => __('Enabled'),
0 => __('Disabled'),
],
'safe_mode_change',
-1,
'',
__('No change'),
-1,
true
).'&nbsp;';
$table->data[7][1] .= __('Module').'&nbsp;';
$table->data[7][1] .= html_print_select(
'',
'safe_mode_module',
'',
'',
__('Any'),
-1,
true
html_print_select(
[
-1 => __('No change'),
1 => __('Yes'),
0 => __('No'),
],
'quiet_select',
$quiet_select,
'',
'',
0,
true
)
);
$table->data[8][0] = __('Ignore unknown').ui_print_help_tip(_('This disables the calculation of the unknown state in the agent and any of its modules, so it will never transition to unknown. The state it reflects is the last known status.'), true);
$table->data[8][1] = html_print_select(
[
'' => __('No change'),
'1' => __('Yes'),
'0' => __('No'),
],
'ignore_unknown',
'',
'',
'',
'',
true,
false,
false,
'w100p'
$table->data[5][1] = html_print_label_input_block(
__('Safe operation mode').': '.ui_print_help_tip(
__(
'This mode allow %s to disable all modules of this agent while the selected module is on CRITICAL status',
get_product_name()
),
true
),
'<div class="flex-row-center">'.html_print_select(
[
1 => __('Enabled'),
0 => __('Disabled'),
],
'safe_mode_change',
-1,
'',
__('No change'),
-1,
true
).'<div class="flex-row-center mrgn_lft_20px">'.__('Module').'&nbsp;&nbsp;&nbsp;'.html_print_select(
'',
'safe_mode_module',
'',
'',
__('Any'),
-1,
true
).'</div></div>'
);
$table->data[6][0] = html_print_label_input_block(
__('Ignore unknown').ui_print_help_tip(_('This disables the calculation of the unknown state in the agent and any of its modules, so it will never transition to unknown. The state it reflects is the last known status.'), true),
html_print_select(
[
'' => __('No change'),
'1' => __('Yes'),
'0' => __('No'),
],
'ignore_unknown',
'',
'',
'',
'',
true,
false,
false,
'w100p'
)
);
ui_toggle(html_print_table($table, true), __('Advanced options'));
@ -1209,16 +1256,13 @@ unset($table);
$table = new StdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->class = 'databox filters filter-table-adv';
$table->head = [];
$table->style = [];
$table->style[0] = 'font-weight: bold; width: 150px;';
$table->data = [];
$table->size[0] = '15%';
$table->size[1] = '35%';
$table->size[2] = '15%';
$table->size[3] = '35%';
$table->size[0] = '50%';
$table->size[1] = '50%';
$fields = db_get_all_fields_in_table('tagent_custom_fields');
@ -1226,6 +1270,8 @@ if ($fields === false) {
$fields = [];
}
$row = 0;
$col = 0;
foreach ($fields as $field) {
$data[0] = '<b>'.$field['name'].'</b>';
$combo = [];
@ -1270,7 +1316,7 @@ foreach ($fields as $field) {
2,
65,
$custom_value,
'class="mrgn_right_30px"',
'class=""',
true
);
}
@ -1290,7 +1336,20 @@ foreach ($fields as $field) {
);
};
array_push($table->data, $data);
$output = html_print_label_input_block(
$data[0],
$data[1]
);
// array_push($table->data, $output);
$table->data[$row][$col] = $output;
if ($col === 1) {
$col = 0;
$row++;
} else {
$col++;
}
}
if (empty($fields) === false) {

View File

@ -865,7 +865,7 @@ $table->data[15][0] = html_print_label_input_block(
$table->data[16][0] = html_print_label_input_block(
__('Interval'),
html_print_extended_select_for_time(
html_print_select_agentmodule_interval(
'module_interval',
0,
'',
@ -2444,6 +2444,10 @@ function process_manage_edit($module_name, $agents_select=null, $module_status='
case 'module_interval':
if ($value != 0) {
$values[$field] = $value;
if ($values[$field] < 60) {
$values[$field] = 60;
}
}
break;

View File

@ -252,7 +252,7 @@ $alertstab = [
$policiesalertstab = [
'text' => '<a href="'.$url.'&tab=massive_policies_alerts">'.html_print_image(
'images/policies_mc.png',
'images/policy@svg.svg',
true,
[
'title' => __('Policies alerts'),

View File

@ -386,54 +386,34 @@ if ($access_console_node === true) {
$menu_godmode['galertas']['sub'] = $sub;
}
if ((bool) check_acl($config['id_user'], 0, 'AW') === true || (bool) check_acl($config['id_user'], 0, 'PM') === true) {
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
// Servers.
$menu_godmode['gservers']['text'] = __('Servers');
$menu_godmode['gservers']['sec2'] = 'godmode/servers/modificar_server';
$menu_godmode['gservers']['id'] = 'god-servers';
$sub = [];
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
$sub['godmode/servers/modificar_server']['text'] = __('Manage servers');
$sub['godmode/servers/modificar_server']['id'] = 'Manage_servers';
}
if ((bool) check_acl($config['id_user'], 0, 'PM') === true
|| is_user_admin($config['id_user']) === true
) {
$sub['godmode/consoles/consoles']['text'] = __('Manage consoles');
$sub['godmode/consoles/consoles']['id'] = 'Manage consoles';
}
$sub['godmode/servers/modificar_server']['text'] = __('Manage servers');
$sub['godmode/servers/modificar_server']['id'] = 'Manage_servers';
$sub['godmode/consoles/consoles']['text'] = __('Manage consoles');
$sub['godmode/consoles/consoles']['id'] = 'Manage consoles';
// This subtabs are only for Pandora Admin.
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
enterprise_hook('ha_cluster');
$sub['godmode/servers/plugin']['text'] = __('Plugins');
$sub['godmode/servers/plugin']['id'] = 'Plugins';
$sub['godmode/servers/plugin_registration']['text'] = __('Register Plugin');
$sub['godmode/servers/plugin_registration']['id'] = 'register_plugin';
enterprise_hook('export_target_submenu');
enterprise_hook('manage_satellite_submenu');
}
enterprise_hook('ha_cluster');
$sub['godmode/servers/plugin']['text'] = __('Plugins');
$sub['godmode/servers/plugin']['id'] = 'Plugins';
$sub['godmode/servers/plugin_registration']['text'] = __('Register Plugin');
$sub['godmode/servers/plugin_registration']['id'] = 'register_plugin';
enterprise_hook('export_target_submenu');
enterprise_hook('manage_satellite_submenu');
$menu_godmode['gservers']['sub'] = $sub;
}
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
// Setup.
$menu_godmode['gsetup']['text'] = __('Setup');
$menu_godmode['gsetup']['text'] = __('Settings');
$menu_godmode['gsetup']['sec2'] = 'general';
$menu_godmode['gsetup']['id'] = 'god-setup';
$sub = [];
// Options Setup.
$sub['general']['text'] = __('Setup');
$sub['general']['text'] = __('System Settings');
$sub['general']['id'] = 'Setup';
$sub['general']['type'] = 'direct';
$sub['general']['subtype'] = 'nolink';
@ -457,41 +437,31 @@ if ($access_console_node === true) {
$sub2['godmode/setup/setup&section=vis']['text'] = __('Visual styles');
$sub2['godmode/setup/setup&section=vis']['refr'] = 0;
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
if ((bool) $config['activate_netflow'] === true) {
$sub2['godmode/setup/setup&section=net']['text'] = __('Netflow');
$sub2['godmode/setup/setup&section=net']['refr'] = 0;
}
if ((bool) $config['activate_netflow'] === true) {
$sub2['godmode/setup/setup&section=net']['text'] = __('Netflow');
$sub2['godmode/setup/setup&section=net']['refr'] = 0;
}
if ((bool) $config['activate_sflow'] === true) {
$sub2['godmode/setup/setup&section=sflow']['text'] = __('Sflow');
$sub2['godmode/setup/setup&section=sflow']['refr'] = 0;
}
if ((bool) $config['activate_sflow'] === true) {
$sub2['godmode/setup/setup&section=sflow']['text'] = __('Sflow');
$sub2['godmode/setup/setup&section=sflow']['refr'] = 0;
}
$sub2['godmode/setup/setup&section=pandorarc']['text'] = __('Pandora RC');
$sub2['godmode/setup/setup&section=pandorarc']['refr'] = 0;
$sub2['godmode/setup/setup&section=ITSM']['text'] = __('ITSM');
$sub2['godmode/setup/setup&section=ITSM']['refr'] = 0;
enterprise_hook('module_library_submenu');
$sub2['godmode/setup/setup&section=notifications']['text'] = __('Notifications');
$sub2['godmode/setup/setup&section=notifications']['refr'] = 0;
$sub2['godmode/setup/setup&section=quickshell']['text'] = __('QuickShell');
$sub2['godmode/setup/setup&section=quickshell']['refr'] = 0;
$sub2['godmode/setup/setup&section=external_tools']['text'] = __('External Tools');
$sub2['godmode/setup/setup&section=external_tools']['refr'] = 0;
$sub2['godmode/setup/setup&section=welcome_tips']['text'] = __('Welcome Tips');
$sub2['godmode/setup/setup&section=welcome_tips']['refr'] = 0;
$sub2['godmode/setup/setup&section=demo_data']['text'] = __('Demo data');
$sub2['godmode/setup/setup&section=demo_data']['refr'] = 0;
if ((bool) $config['activate_gis'] === true) {
$sub2['godmode/setup/setup&section=gis']['text'] = __('Map conections GIS');
}
@ -500,11 +470,16 @@ if ($access_console_node === true) {
$sub['godmode/setup/license']['text'] = __('License');
$sub['godmode/setup/license']['id'] = 'license';
enterprise_hook('skins_submenu');
enterprise_hook('translate_string_submenu');
$menu_godmode['gsetup']['sub'] = $sub;
} else if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
$menu_godmode['gservers']['text'] = __('Servers');
$menu_godmode['gservers']['sec2'] = 'godmode/servers/modificar_server';
$menu_godmode['gservers']['id'] = 'god-servers';
$sub = [];
enterprise_hook('manage_satellite_submenu');
$menu_godmode['gservers']['sub'] = $sub;
}
}
@ -538,7 +513,7 @@ if ((bool) check_acl($config['id_user'], 0, 'PM') === true || (bool) check_acl($
$sub['godmode/setup/links']['id'] = 'links';
$sub['tools/diagnostics']['text'] = __('Diagnostic info');
$sub['tools/diagnostics']['id'] = 'diagnostic_info';
enterprise_hook('omnishell');
// enterprise_hook('omnishell');
$sub['godmode/setup/news']['text'] = __('Site news');
$sub['godmode/setup/news']['id'] = 'site_news';
}
@ -740,7 +715,7 @@ if ($access_console_node === true) {
$sub['operation/agentes/exportdata']['id'] = 'export_data';
}
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
if ((bool) check_acl($config['id_user'], 0, 'PM') === true || enterprise_hook('enterprise_acl', [$config['id_user'], 'tools', 'operation/extensions', false]) === true) {
$sub['godmode/files_repo/files_repo']['text'] = __('File repository');
$sub['godmode/files_repo/files_repo']['id'] = 'file_repository';
}
@ -806,8 +781,10 @@ $("#conf_wizard").click(function() {
})
}
},
closeOnEscape: true,
onload: () => {
$(document).ready(function () {
$(".ui-dialog-titlebar-close").hide();
var buttonpane = $("div[aria-describedby='welcome_modal_window'] .ui-dialog-buttonpane.ui-widget-content.ui-helper-clearfix");
$(buttonpane).append(`
<div class="welcome-wizard-buttons">

View File

@ -82,6 +82,11 @@ $snmp_oid = (string) get_parameter('snmp_oid');
$snmp_community = (string) get_parameter('snmp_community');
$id_module_group = (int) get_parameter('id_module_group');
$module_interval = (int) get_parameter('module_interval');
// Limit module interval to at least 60 secs.
if ($module_interval > 0) {
$module_interval = max($module_interval, 60);
}
$id_group = (int) get_parameter('id_group');
$plugin_user = (string) get_parameter('plugin_user');
$plugin_pass = io_input_password((string) get_parameter('plugin_pass'));

View File

@ -154,7 +154,7 @@ $table->data[2][0] = html_print_label_input_block(
$table->data[2][1] = html_print_label_input_block(
__('Interval'),
html_print_extended_select_for_time('module_interval', $module_interval, '', '', '0', false, true)
html_print_select_agentmodule_interval('module_interval', $module_interval, '', '', '0', false, true)
);
$dynamic_interval_img = '<a onclick="advanced_option_dynamic()" class="mrgn_lft_5px mrgn_top_6px">'.html_print_image(

View File

@ -319,7 +319,7 @@ $ActionButtons[] = html_print_button(
__('Go back'),
'back',
false,
"window.location.href = 'index.php?sec=reporting&sec2=godmode/reporting/graphs'",
'history.go(-1)',
[
'class' => 'sub ok submitButton',
'icon' => 'back',

View File

@ -366,12 +366,12 @@ $filterTable->data[0][] = html_print_label_input_block(
$filterTable->data[0][] = html_print_label_input_block(
__('Group'),
html_print_select_groups(false, 'AR', $return_all_group, 'ag_group', $ag_group, 'this.form.submit();', '', 0, true, false, true, '', false)
html_print_select_groups(false, 'AR', $return_all_group, 'ag_group', $ag_group, '', '', 0, true, false, true, '', false)
);
$filterTable->data[0][] = html_print_label_input_block(
__('Group Recursion'),
html_print_checkbox_switch('recursion', 1, $recursion, true, false, 'this.form.submit()')
html_print_checkbox_switch('recursion', 1, $recursion, true, false, '')
);
if (is_metaconsole() === false) {
@ -553,6 +553,10 @@ if (!$maps && is_metaconsole() === false) {
['class' => 'main_menu_icon invert_filter']
).'</a>';
} else {
$table->cellclass[] = [
3 => 'table_action_buttons',
4 => 'table_action_buttons',
];
$data[3] = '<a class="copy_visualmap" href="index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id_layout='.$map['id'].'&amp;copy_layout=1">'.html_print_image(
'images/copy.svg',
true,

View File

@ -52,6 +52,11 @@ if (! check_acl($config['id_user'], 0, 'RW')
exit;
}
// Get pandora black theme.
if ($config['style'] === 'pandora_black') {
html_print_input_hidden('selected_style_theme', 'pandora_black');
}
$meta = false;
if (($config['metaconsole'] == 1) && (defined('METACONSOLE'))) {
$meta = true;
@ -1454,7 +1459,7 @@ $class = 'databox filters';
<td class="bolder">
<?php
echo __('Module').ui_print_help_tip(
__('Case insensitive regular expression or string for module name. For example: if you use this field with "Module exact match" enabled then this field has to be fulfilled with the literally string of the module name, if not you can use a regular expression. Example: .*usage.* will match: cpu_usage, vram usage in matchine 1.'),
__('Case insensitive regular expression or string for module name. For example: if you use this field with "Module exact match" enabled then this field has to be fulfilled with the literally string of the module name, if not you can use a regular expression. Example: %s will match: cpu_usage, vram usage in matchine 1.', '.*usage.*'),
true
);
?>
@ -2338,7 +2343,7 @@ if (is_metaconsole() === true) {
if ($idAgent) {
$sql = 'SELECT id_agente_modulo, nombre
FROM tagente_modulo
WHERE id_agente = '.$idAgent.' AND delete_pending = 0';
WHERE id_agente = "'.$idAgent.'" AND delete_pending = 0';
if ($meta) {
$connection = metaconsole_get_connection($server_name);
@ -2860,20 +2865,32 @@ if (is_metaconsole() === true) {
if (!empty($style_button_create_custom_graph)) {
$style_create = [
'mode' => 'link',
'mode' => 'mini',
'icon' => 'next',
'class' => 'mrgn_lft_10px',
'style' => 'display:none',
];
} else {
$style_create = [ 'mode' => 'link' ];
$style_create = [
'mode' => 'mini',
'icon' => 'next',
'class' => 'mrgn_lft_10px',
];
}
if (!empty($style_button_edit_custom_graph)) {
$style_edit = [
'mode' => 'link',
'mode' => 'mini',
'icon' => 'update',
'class' => 'mrgn_lft_10px',
'style' => 'display:none',
];
} else {
$style_edit = [ 'mode' => 'link' ];
$style_edit = [
'mode' => 'mini',
'icon' => 'update',
'class' => 'mrgn_lft_10px',
];
}
html_print_button(
@ -6178,7 +6195,12 @@ $(document).ready (function () {
});
});
defineTinyMCE('#textarea_render_definition');
var consoleStyle = $("#hidden-selected_style_theme").val();
if (consoleStyle == "pandora_black") {
defineTinyMCEDark('#textarea_render_definition');
} else {
defineTinyMCE('#textarea_render_definition');
}
$("#checkbox-select_by_group").change(function () {
var select_by_group = $('#checkbox-select_by_group').prop('checked');

View File

@ -911,7 +911,7 @@ switch ($action) {
// Admin options only for RM flag.
if (check_acl($config['id_user'], 0, 'RM')) {
if (check_acl($config['id_user'], 0, 'RR')) {
$table->head[$next] = __('Private');
$table->headstyle[$next] = 'min-width: 40px;text-align: left;';
$table->size[$next] = '2%';
@ -929,7 +929,7 @@ switch ($action) {
$next++;
$op_column = false;
if (is_metaconsole() === false) {
if (is_metaconsole() === false && check_acl($config['id_user'], 0, 'RM')) {
$op_column = true;
$table->head[$next] = '<span title="Operations">'.__('Op.').'</span>'.html_print_checkbox(
'all_delete',
@ -1082,7 +1082,7 @@ switch ($action) {
}
// Admin options only for RM flag.
if (check_acl($config['id_user'], 0, 'RM')) {
if (check_acl($config['id_user'], 0, 'RR')) {
if ($report['private'] == 1) {
$data[$next] = __('Yes');
} else {
@ -1328,6 +1328,25 @@ switch ($action) {
],
true
);
} else if (check_acl($config['id_user'], 0, 'RR')) {
$tablePagination = ui_pagination(
$total_reports,
$url,
$offset,
$pagination,
true,
'offset',
$show_count
);
echo html_print_action_buttons(
'',
[
'type' => 'form_action',
'right_content' => $tablePagination,
],
true
);
}
return;
@ -2407,11 +2426,16 @@ switch ($action) {
$values['top_n_value'] = get_parameter('max_items');
$values['server_name'] = get_parameter('combo_server_sql');
if ($sql !== '') {
if ($sql !== '' && $sql !== null) {
// Replaces possible macros to check the validity of the query
$macros_sql = $sql;
$macros_sql = str_replace('_start_date_', '0', $macros_sql);
$macros_sql = str_replace('_end_date_', 'NOW()', $macros_sql);
if ($values['server_name'] === 'all') {
$servers_connection = metaconsole_get_connections();
foreach ($servers_connection as $key => $s) {
$good_format = db_validate_sql($sql, $s['server_name']);
$good_format = db_validate_sql($macros_sql, $s['server_name']);
}
// Reconnected in nodo if exist.
@ -2423,9 +2447,9 @@ switch ($action) {
}
} else if ($server_id === 0) {
// Connect with node if not exist conexion.
$good_format = db_validate_sql($sql, (is_metaconsole() === true) ? $values['server_name'] : false);
$good_format = db_validate_sql($macros_sql, (is_metaconsole() === true) ? $values['server_name'] : false);
} else {
$good_format = db_validate_sql($sql);
$good_format = db_validate_sql($macros_sql);
}
}
} else if ($values['type'] == 'url') {
@ -3352,11 +3376,16 @@ switch ($action) {
$values['server_name'] = get_parameter('combo_server_sql');
if ($sql !== '') {
if ($sql !== '' && $sql !== null) {
// Replaces possible macros to check the validity of the query
$macros_sql = $sql;
$macros_sql = str_replace('_start_date_', '0', $macros_sql);
$macros_sql = str_replace('_end_date_', 'NOW()', $macros_sql);
if ($values['server_name'] === 'all') {
$servers_connection = metaconsole_get_connections();
foreach ($servers_connection as $key => $s) {
$good_format = db_validate_sql($sql, $s['server_name']);
$good_format = db_validate_sql($macros_sql, $s['server_name']);
}
// Reconnected in nodo if exist.
@ -3368,9 +3397,9 @@ switch ($action) {
}
} else if ($server_id === 0) {
// Connect with node if not exist conexion.
$good_format = db_validate_sql($sql, (is_metaconsole() === true) ? $values['server_name'] : false);
$good_format = db_validate_sql($macros_sql, (is_metaconsole() === true) ? $values['server_name'] : false);
} else {
$good_format = db_validate_sql($sql);
$good_format = db_validate_sql($macros_sql);
}
}
} else if ($values['type'] == 'url') {

View File

@ -157,7 +157,7 @@ if ((bool) users_is_admin() === false) {
$where = sprintf(' AND id_usuario = "%s"', $config['id_user']);
}
$sql = 'SELECT * FROM tuser_task_scheduled WHERE id_user_task IN (1,2,3,4) '.$where;
$sql = 'SELECT * FROM tuser_task_scheduled WHERE id_user_task IN (1,2,3) '.$where;
$reports = db_get_all_rows_sql($sql);
if ($reports !== false) {
$table = new stdClass();

View File

@ -114,6 +114,7 @@ foreach ($all_images as $image_file) {
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filter-table-adv';
$table->styleTable = 'min-width: 900px; table-layout:fixed;';
$table->head = [];
$table->head['icon'] = '';
@ -122,8 +123,7 @@ $table->head[1] = __('Image').'<br>'.__('Module').' / '.__('Custom graph');
$table->head[2] = __('Width x Height<br>Max value');
$table->head[3] = __('Position').'<br>'.__('Period');
$table->head[4] = __('Parent').'<br>'.__('Map linked');
$table->head[5] = '';
$table->head[5] .= '&nbsp;&nbsp;&nbsp;'.html_print_checkbox(
$table->head[5] = html_print_checkbox(
'head_multiple_delete',
'',
false,
@ -133,41 +133,66 @@ $table->head[5] .= '&nbsp;&nbsp;&nbsp;'.html_print_checkbox(
);
$table->head[5] .= '&nbsp;&nbsp;&nbsp;<span title="'.__('Action').'">'.__('A.').'</span>';
$table->size = [];
$table->size['icon'] = '1%';
$table->size[0] = '28%';
$table->size[1] = '';
$table->size[2] = '25%';
$table->size[3] = '27%';
$table->size[4] = '7%';
$table->size[5] = '15%';
$table->headstyle = [];
$table->headstyle['icon'] = 'text-align:left; width: 1%;';
$table->headstyle[0] = 'text-align:left; width: 19%;';
$table->headstyle[1] = 'text-align:left; width: 19%;';
$table->headstyle[2] = 'text-align:left; width: 19%;';
$table->headstyle[3] = 'text-align:left; width: 19%;';
$table->headstyle[4] = 'text-align:left; width: 19%;';
$table->headstyle[5] = 'text-align:right; width: 4%;';
$table->align = [];
if (!defined('METACONSOLE')) {
$table->headstyle[0] = 'text-align:left;';
$table->headstyle[1] = 'text-align:left';
$table->headstyle[2] = 'text-align:left';
$table->headstyle[3] = 'text-align:left';
$table->headstyle[4] = 'text-align:left';
$table->headstyle[5] = 'text-align:left';
$table->align[0] = 'left';
$table->align[1] = 'left';
$table->align[2] = 'left';
$table->align[3] = 'left';
$table->align[4] = 'left';
$table->align[5] = 'left';
}
$table->align[0] = 'left';
$table->align[1] = 'left';
$table->align[2] = 'left';
$table->align[3] = 'left';
$table->align[4] = 'left';
$table->align[5] = 'right';
$table->data = [];
// Background
// Background.
$table->data[0]['icon'] = '';
$table->data[0][0] = '<div sclass="invisible">'.__('Background').'</div>';
$table->data[0][1] = '<div sclass="invisible">'.html_print_select($backgrounds_list, 'background', $visualConsole['background'], '', 'None', '', true, false, true, '', false, 'width: 120px;').'</div>';
$table->data[0][2] = '<div sclass="invisible">'.html_print_input_text('width', $visualConsole['width'], '', 3, 5, true).' x '.html_print_input_text('height', $visualConsole['height'], '', 3, 5, true).'</div>';
$table->data[0][3] = $table->data[0][4] = $table->data[0][5] = '';
$table->data[0][0] = '<div>'.__('Background').'</div>';
$table->data[0][1] = '<div>';
$table->data[0][1] .= html_print_select(
$backgrounds_list,
'background',
$visualConsole['background'],
'',
'None',
'',
true,
false,
true,
'',
false,
'width: 100%;'
);
$table->data[0][1] .= '</div>';
$table->data[0][2] = '<div class="row-flex">';
$table->data[0][2] .= html_print_input_text(
'width',
$visualConsole['width'],
'',
3,
5,
true
);
$table->data[0][2] .= '<span class="mrgn_5px">x</span>';
$table->data[0][2] .= html_print_input_text(
'height',
$visualConsole['height'],
'',
3,
5,
true
);
$table->data[0][2] .= '</div>';
$table->data[0][3] = '';
$table->data[0][4] = '';
$table->data[0][5] = '';
$i = 1;
$layoutDatas = db_get_all_rows_field_filter(
@ -186,7 +211,7 @@ $x = 0;
foreach ($layoutDatas as $layoutData) {
$idLayoutData = $layoutData['id'];
// line between rows
// Line between rows.
$table->data[$i][0] = '<hr>';
$table->colspan[$i][0] = '8';
@ -208,7 +233,7 @@ foreach ($layoutDatas as $layoutData) {
true,
[
'title' => __('Percentile Bar'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
break;
@ -219,7 +244,7 @@ foreach ($layoutDatas as $layoutData) {
true,
[
'title' => __('Percentile Bubble'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
break;
@ -231,7 +256,7 @@ foreach ($layoutDatas as $layoutData) {
true,
[
'title' => __('Percentile'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
break;
@ -413,7 +438,7 @@ foreach ($layoutDatas as $layoutData) {
break;
default:
if (enterprise_installed()) {
if (enterprise_installed() === true) {
$table->data[($i + 1)]['icon'] = enterprise_visual_map_print_list_element('icon', $layoutData);
} else {
$table->data[($i + 1)]['icon'] = '';
@ -421,26 +446,27 @@ foreach ($layoutDatas as $layoutData) {
break;
}
// First row
// Label
// Label.
switch ($layoutData['type']) {
case ICON:
case BOX_ITEM:
case NETWORK_LINK:
case LINE_ITEM:
// hasn't the label.
// Hasn't the label.
$table->data[($i + 1)][0] = '';
break;
default:
$table->data[($i + 1)][0] = '<span class="w150px block">'.html_print_input_hidden('label_'.$idLayoutData, $layoutData['label'], true).'<a href="javascript: show_dialog_label_editor('.$idLayoutData.');">'.__('Edit label').'</a>'.'</span>';
$table->data[($i + 1)][0] = '<span class="w150px block">';
$table->data[($i + 1)][0] .= html_print_input_hidden('label_'.$idLayoutData, $layoutData['label'], true);
$table->data[($i + 1)][0] .= '<a href="javascript: show_dialog_label_editor('.$idLayoutData.');">';
$table->data[($i + 1)][0] .= __('Edit label');
$table->data[($i + 1)][0] .= '</a></span>';
break;
}
// Image
// Image.
switch ($layoutData['type']) {
case STATIC_GRAPH:
case ICON:
@ -458,7 +484,7 @@ foreach ($layoutDatas as $layoutData) {
true,
'',
false,
'width: 120px'
'width: 100%'
);
break;
@ -467,47 +493,102 @@ foreach ($layoutDatas as $layoutData) {
break;
}
// Position.
$readonly = false;
if ($layoutData['type'] == NETWORK_LINK || $layoutData['type'] == LINE_ITEM) {
$readonly = true;
}
// Width and height
// Width and height.
switch ($layoutData['type']) {
case NETWORK_LINK:
case LINE_ITEM:
// hasn't the width and height.
$table->data[($i + 1)][2] = '';
break;
case COLOR_CLOUD:
$table->data[($i + 1)][2] = html_print_input_text('width_'.$idLayoutData, $layoutData['width'], '', 2, 5, true).' x '.html_print_input_text('height_'.$idLayoutData, $layoutData['width'], '', 2, 5, true);
$table->data[($i + 1)][2] = '<div class="row-flex">';
$table->data[($i + 1)][2] .= html_print_input_text(
'width_'.$idLayoutData,
$layoutData['width'],
'',
2,
5,
true
);
$table->data[($i + 1)][2] .= '<span class="mrgn_5px">x</span>';
$table->data[($i + 1)][2] .= html_print_input_text(
'height_'.$idLayoutData,
$layoutData['width'],
'',
2,
5,
true
);
$table->data[($i + 1)][2] .= '</div>';
break;
case CIRCULAR_PROGRESS_BAR:
case CIRCULAR_INTERIOR_PROGRESS_BAR:
case PERCENTILE_BUBBLE:
case PERCENTILE_BAR:
$table->data[($i + 1)][2] = html_print_input_text('width_'.$idLayoutData, $layoutData['width'], '', 2, 5, true);
$table->data[($i + 1)][2] = '<div class="row-flex">';
$table->data[($i + 1)][2] .= html_print_input_text(
'width_'.$idLayoutData,
$layoutData['width'],
'',
2,
5,
true
);
$table->data[($i + 1)][2] .= '</div>';
break;
default:
$table->data[($i + 1)][2] = html_print_input_text('width_'.$idLayoutData, $layoutData['width'], '', 2, 5, true).' x '.html_print_input_text('height_'.$idLayoutData, $layoutData['height'], '', 2, 5, true);
$table->data[($i + 1)][2] = '<div class="row-flex">';
$table->data[($i + 1)][2] .= html_print_input_text(
'width_'.$idLayoutData,
$layoutData['width'],
'',
2,
5,
true,
$readonly
);
$table->data[($i + 1)][2] .= '<span class="mrgn_5px">x</span>';
$table->data[($i + 1)][2] .= html_print_input_text(
'height_'.$idLayoutData,
$layoutData['height'],
'',
2,
5,
true,
$readonly
);
$table->data[($i + 1)][2] .= '</div>';
break;
}
// Position
switch ($layoutData['type']) {
case NETWORK_LINK:
case LINE_ITEM:
// hasn't the width and height.
$table->data[($i + 1)][3] = '';
break;
$table->data[($i + 1)][3] = '<div class="row-flex">';
$table->data[($i + 1)][3] .= '<span class="mrgn_5px">(</span>';
$table->data[($i + 1)][3] .= html_print_input_text(
'left_'.$idLayoutData,
$layoutData['pos_x'],
'',
2,
5,
true,
$readonly
);
$table->data[($i + 1)][3] .= '<span class="mrgn_5px">,</span>';
$table->data[($i + 1)][3] .= html_print_input_text(
'top_'.$idLayoutData,
$layoutData['pos_y'],
'',
2,
5,
true,
$readonly
);
$table->data[($i + 1)][3] .= '<span class="mrgn_5px">)</span>';
$table->data[($i + 1)][3] .= '</div>';
default:
$table->data[($i + 1)][3] = '( '.html_print_input_text('left_'.$idLayoutData, $layoutData['pos_x'], '', 2, 5, true).' , '.html_print_input_text('top_'.$idLayoutData, $layoutData['pos_y'], '', 2, 5, true).' )';
break;
}
// Parent
// Parent.
switch ($layoutData['type']) {
case BOX_ITEM:
case NETWORK_LINK:
@ -517,39 +598,57 @@ foreach ($layoutDatas as $layoutData) {
break;
default:
$table->data[($i + 1)][4] = html_print_select(
$table->data[($i + 1)][4] = '<div>'.html_print_select(
$parents,
'parent_'.$idLayoutData,
$layoutData['parent_item'],
'',
__('None'),
0,
true
);
true,
false,
true,
'',
false,
'width: 100%;'
).'</div>';
break;
}
// Delete row button
if (!defined('METACONSOLE')) {
$url_delete = 'index.php?'.'sec=network&'.'sec2=godmode/reporting/visual_console_builder&'.'tab='.$activeTab.'&'.'action=delete&'.'id_visual_console='.$visualConsole['id'].'&'.'id_element='.$idLayoutData;
} else {
$url_delete = 'index.php?'.'operation=edit_visualmap&'.'sec=screen&'.'sec2=screens/screens&'.'action=visualmap&'.'pure='.(int) get_parameter('pure', 0).'&'.'tab=list_elements&'.'action2=delete&'.'id_visual_console='.$visualConsole['id'].'&'.'id_element='.$idLayoutData;
// Delete row button.
$url_delete = 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder';
$url_delete .= '&tab='.$activeTab.'&action=delete';
$url_delete .= '&id_visual_console='.$visualConsole['id'].'&id_element='.$idLayoutData;
if (is_metaconsole() === true) {
$url_delete = 'index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap';
$url_delete .= '&pure='.(int) get_parameter('pure', 0);
$url_delete .= '&tab=list_elements&action2=delete';
$url_delete .= '&id_visual_console='.$visualConsole['id'].'&id_element='.$idLayoutData;
}
$table->data[($i + 1)][5] = '';
$table->data[($i + 1)][5] = '<div class="row-flex flex-end">';
$table->data[($i + 1)][5] .= html_print_checkbox('multiple_delete_items', $idLayoutData, false, true);
$table->data[($i + 1)][5] .= '<a href="'.$url_delete.'"onclick="javascript: if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).'</a>';
$table->data[($i + 1)][5] .= '<a href="'.$url_delete.'"onclick="javascript: if (!confirm(\''.__('Are you sure?').'\')) return false;">';
$table->data[($i + 1)][5] .= html_print_image(
'images/delete.svg',
true,
['class' => 'main_menu_icon invert_filter']
);
$table->data[($i + 1)][5] .= '</a>';
$table->data[($i + 1)][5] .= html_print_input_hidden('updated_'.$idLayoutData, '0', true);
$table->data[($i + 1)][5] .= html_print_input_hidden('rowtype_'.$idLayoutData, $layoutData['type'], true);
$table->data[($i + 1)][5] .= '</div>';
// Second row
// Second row.
$table->data[($i + 2)]['icon'] = '';
// Agent
// Agent.
switch ($layoutData['type']) {
case GROUP_ITEM:
$own_info = get_user_info($config['id_user']);
if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'PM')) {
if ((bool) $own_info['is_admin'] === false
&& (bool) check_acl($config['id_user'], 0, 'PM') === false
) {
$return_all_group = false;
} else {
$return_all_group = true;
@ -564,7 +663,12 @@ foreach ($layoutDatas as $layoutData) {
'',
'',
0,
true
true,
false,
false,
'',
false,
'width:100%'
);
break;
@ -579,24 +683,25 @@ foreach ($layoutDatas as $layoutData) {
default:
$cell_content_enterprise = false;
if (enterprise_installed()) {
if (enterprise_installed() === true) {
$cell_content_enterprise = enterprise_visual_map_print_list_element('agent', $layoutData);
}
if ($cell_content_enterprise === false) {
$params = [];
$params['return'] = true;
$params['show_helptip'] = true;
$params['show_helptip'] = false;
$params['size'] = 20;
$params['input_name'] = 'agent_'.$idLayoutData;
$params['javascript_is_function_select'] = true;
$params['selectbox_id'] = 'module_'.$idLayoutData;
if (defined('METACONSOLE')) {
if (is_metaconsole() === true) {
$params['javascript_ajax_page'] = '../../ajax.php';
$params['disabled_javascript_on_blur_function'] = true;
$params['print_input_id_server'] = true;
$params['input_id_server_id'] = $params['input_id_server_name'] = 'id_server_id_'.$idLayoutData;
$params['input_id_server_id'] = 'id_server_id_'.$idLayoutData;
$params['input_id_server_name'] = 'id_server_id_'.$idLayoutData;
$params['input_id_server_value'] = $layoutData['id_metaconsole'];
$params['metaconsole_enabled'] = true;
$params['print_hidden_input_idagent'] = true;
@ -616,7 +721,7 @@ foreach ($layoutDatas as $layoutData) {
$params['value'] = db_get_value('alias', 'tagente', 'id_agente', $layoutData['id_agent']);
}
if ($layoutData['id_custom_graph'] != 0) {
if ((int) $layoutData['id_custom_graph'] !== 0) {
$table->data[($i + 2)][0] = __('Custom graph');
} else {
$table->data[($i + 2)][0] = ui_print_agent_autocomplete_input($params);
@ -627,8 +732,7 @@ foreach ($layoutDatas as $layoutData) {
break;
}
// Module
// Module.
switch ($layoutData['type']) {
case ICON:
case LABEL:
@ -642,21 +746,21 @@ foreach ($layoutDatas as $layoutData) {
default:
if ($layoutData['id_layout_linked'] != 0) {
// It is a item that links with other visualmap
// It is a item that links with other visualmap.
$table->data[($i + 2)][1] = '';
break;
}
$cell_content_enterprise = false;
if (enterprise_installed()) {
if (enterprise_installed() === true) {
$cell_content_enterprise = enterprise_visual_map_print_list_element('module', $layoutData);
}
if ($cell_content_enterprise === false) {
if (!defined('METACONSOLE')) {
if (is_metaconsole() === false) {
$modules = agents_get_modules($layoutData['id_agent']);
} else {
if ($layoutData['id_agent'] != 0) {
if ((int) $layoutData['id_agent'] !== 0) {
$server = db_get_row('tmetaconsole_setup', 'id', $layoutData['id_metaconsole']);
if (metaconsole_connect($server) == NOERR) {
$modules = agents_get_modules($layoutData['id_agent']);
@ -668,7 +772,7 @@ foreach ($layoutDatas as $layoutData) {
$modules = io_safe_output($modules);
if ($layoutData['id_custom_graph'] != 0) {
if (is_metaconsole()) {
if (is_metaconsole() === true) {
$graphs = [];
$graphs = metaconsole_get_custom_graphs(true);
$table->data[($i + 2)][1] = html_print_select(
@ -678,7 +782,12 @@ foreach ($layoutDatas as $layoutData) {
'',
__('None'),
0,
true
true,
false,
true,
'',
false,
'width:100%'
);
} else {
$table->data[($i + 2)][1] = html_print_select_from_sql(
@ -688,7 +797,11 @@ foreach ($layoutDatas as $layoutData) {
'',
__('None'),
0,
true
true,
false,
true,
false,
'width:100%'
);
}
} else {
@ -704,7 +817,7 @@ foreach ($layoutDatas as $layoutData) {
true,
'',
false,
'width: 120px'
'width: 100%'
);
}
} else {
@ -713,16 +826,17 @@ foreach ($layoutDatas as $layoutData) {
break;
}
// Empty
// Empty.
$table->data[($i + 2)][2] = '';
// Period
// Period.
switch ($layoutData['type']) {
case MODULE_GRAPH:
case SIMPLE_VALUE_MAX:
case SIMPLE_VALUE_MIN:
case SIMPLE_VALUE_AVG:
$table->data[($i + 2)][3] = html_print_extended_select_for_time(
$table->data[($i + 2)][3] .= '<div class="row-flex">';
$table->data[($i + 2)][3] .= html_print_extended_select_for_time(
'period_'.$idLayoutData,
$layoutData['period'],
'',
@ -731,6 +845,7 @@ foreach ($layoutDatas as $layoutData) {
10,
true
);
$table->data[($i + 2)][3] .= '</div>';
break;
default:
@ -738,7 +853,7 @@ foreach ($layoutDatas as $layoutData) {
break;
}
// Map linked
// Map linked.
switch ($layoutData['type']) {
case NETWORK_LINK:
case LINE_ITEM:
@ -761,9 +876,8 @@ foreach ($layoutDatas as $layoutData) {
true,
false,
true,
'',
false,
'width: 120px'
'width:100%'
);
break;
}

View File

@ -145,6 +145,11 @@ $table->data['all_0'][0] = html_print_label_input_block(
$table->rowstyle['staticgraph'] = 'display: none;';
$table->colspan['staticgraph'][0] = 2;
$src = $config['homeurl'].'/images/console/icons/appliance_ok.png';
if (is_metaconsole() === true) {
$src = $config['homeurl'].'../../images/console/icons/appliance_ok.png';
}
$table->data['staticgraph'][0] = html_print_label_input_block(
__('Image'),
'<div class="flex">'.html_print_select(
@ -160,7 +165,7 @@ $table->data['staticgraph'][0] = html_print_label_input_block(
'',
false,
'width: 49%'
).'<span id="image_prev" class="mrgn_lft_10px mrgn_top-10px"><img src="'.$config['homeurl'].'/images/console/icons/appliance_ok.png"></span></div>'
).'<span id="image_prev" class="mrgn_lft_10px mrgn_top-10px"><img src="'.$src.'"></span></div>'
);
$table->rowstyle['all_1'] = 'display: none;';
@ -625,6 +630,8 @@ echo '</form>';
echo '<span id="any_text" class="invisible">'.__('None').'</span>';
echo '<span id="none_text" class="invisible">'.__('None').'</span>';
echo '<span id="loading_text" class="invisible">'.__('Loading...').'</span>';
echo '<div id="cv-preview-img" title="'.__('Image preview').'"><center><img /></center></div>';
?>
<script type="text/javascript">
@ -902,10 +909,33 @@ function findInSelect(selectid, find){
})
}
$('#image').on('change', function(){
$('#image').on('change', function() {
var img = $(this).val();
$('#image_prev').html('<img src="<?php echo $config['homeurl']; ?>/images/console/icons/'+img+'.png">');
})
var src = "<?php echo $config['homeurl']; ?>"+`/images/console/icons/${img}.png`;
if (metaconsole_enabled) {
src = "<?php echo $config['homeurl']; ?>"+`../../images/console/icons/${img}.png`;
}
$('#image_prev').html(`<img src="${src}">`);
});
$('#wizard_table span#image_prev').click(function (e) {
e.preventDefault();
const src = $('#wizard_table span#image_prev img').attr('src');
$("#cv-preview-img img").attr('src', src);
$("#cv-preview-img").dialog({
resizable: true,
draggable: true,
modal: true,
width: 'auto',
clickOutside: true,
overlay: {
opacity: 0.5,
background: "black"
}
});
});
</script>
<style type="text/css">

View File

@ -34,7 +34,7 @@ require_once $config['homedir'].'/include/functions_graph.php';
check_login();
if (! check_acl($config['id_user'], 0, 'AW')) {
if (! check_acl($config['id_user'], 0, 'PM') && ((bool) check_acl($config['id_user'], 0, 'AW') === true && $_GET['server_remote'] === null)) {
db_pandora_audit(
AUDIT_LOG_ACL_VIOLATION,
'Trying to access Server Management'
@ -286,19 +286,21 @@ if (isset($_GET['server']) === true) {
$id_server
);
$buttons = '';
$buttons = [];
// Buttons.
$buttons = [
'standard_editor' => [
'active' => false,
'text' => '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$id_server.'&ext='.$ext.'&tab=standard_editor&pure='.$pure.'">'.html_print_image('images/list.png', true, ['title' => __('Standard editor')]).'</a>',
],
'advanced_editor' => [
'active' => false,
'text' => '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$id_server.'&ext='.$ext.'&tab=advanced_editor&pure='.$pure.'">'.html_print_image('images/pen.png', true, ['title' => __('Advanced editor')]).'</a>',
],
];
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
$buttons = [
'standard_editor' => [
'active' => false,
'text' => '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$id_server.'&ext='.$ext.'&tab=standard_editor&pure='.$pure.'">'.html_print_image('images/list.png', true, ['title' => __('Standard editor')]).'</a>',
],
'advanced_editor' => [
'active' => false,
'text' => '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$id_server.'&ext='.$ext.'&tab=advanced_editor&pure='.$pure.'">'.html_print_image('images/pen.png', true, ['title' => __('Advanced editor')]).'</a>',
],
];
}
if ($server_type === SERVER_TYPE_ENTERPRISE_SATELLITE) {
$buttons['agent_editor'] = [

View File

@ -93,33 +93,26 @@ if (is_metaconsole() === true) {
}
}
$output = '<div class="new_task">';
$output .= '<div class="image_task">';
$output .= html_print_image(
'images/first_task/icono_grande_import.png',
true,
['title' => __('Plugin Registration') ]
);
$output .= '</div>';
$output .= '<div class="text_task">';
$output .= '<h3>'.__('Plugin registration').'</h3>';
$output .= '<p id="description_task">';
$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/">';
$output .= ' '.__('Public Resource Library');
$output .= '</a>';
$output .= '</p>';
$msg = __('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.');
$msg .= '<br><br>';
$msg .= __('You can get more plugins in our');
$msg .= '<a href="https://pandorafms.com/Library/Library/">';
$msg .= ' '.__('Public Resource Library');
$msg .= '</a>';
// Upload form.
$output .= "<form name='submit_plugin' method='post' enctype='multipart/form-data'>";
$output .= '<table class="" id="table1" width="100%" border="0" cellpadding="4" cellspacing="4">';
$output .= "<tr><td class='datos'><input type='file' name='plugin_upload' />";
$output .= "<td class='datos'><input type='submit' class='sub next' value='".__('Upload')."' />";
$output .= '</form></table>';
$output .= '</div>';
$output .= '</div>';
$button = "<form name='submit_plugin' id='submit-plugin' method='post' enctype='multipart/form-data'>";
$button .= "<input type='file' class='w100p' name='plugin_upload' />";
$button .= "<input type='submit' class='button_task button_task_mini mrgn_0px_imp' value='".__('Upload file')."' />";
$button .= '</form>';
$output = ui_print_empty_view(
__('Register plugins'),
$msg,
'plugins.svg',
$button
);
echo $output;

View File

@ -28,7 +28,9 @@
// Begin.
require_once 'include/functions_clippy.php';
require_once 'pending_alerts_list.php';
if ((bool) check_acl($config['id_user'], 0, 'LM') === true) {
include 'pending_alerts_list.php';
}
global $config;
@ -49,8 +51,8 @@ $date = time();
$servers = servers_get_info();
if ($servers === false) {
$server_clippy = clippy_context_help('servers_down');
echo "<div class='nf'>".__('There are no servers configured into the database').$server_clippy.'</div>';
$no_data_msg = __('There are no servers registered on the database. Please, check the configuration and start the Pandora Server service');
ui_print_info_message($no_data_msg);
return;
}
@ -133,14 +135,12 @@ foreach ($servers as $server) {
__('Server has crashed.'),
true
);
} else if ((int) ($server['disabled'] == 1)){
} else if ((int) ($server['disabled'] == 1)) {
$data[1] = ui_print_status_image(
STATUS_SERVER_STANDBY,
__('Server was manually disabled.'),
true
);
} else if ((int) ($server['status'] === 0)
|| (($date - $server_keepalive) > ($server['server_keepalive']) * 2)
) {

View File

@ -75,8 +75,8 @@ if (isset($text) === false) {
}
$directory = (string) get_parameter('directory');
$directory = str_replace('&lt;', '', $text);
$directory = str_replace('&gt;', '', $text);
$directory = str_replace('&lt;', '', $directory);
$directory = str_replace('&gt;', '', $directory);
if (empty($directory) === true) {
$directory = $fallback_directory;
} else {

View File

@ -68,7 +68,7 @@ if ($renew_license_result !== null) {
}
if ($update_settings) {
if (!is_metaconsole()) {
if (is_metaconsole() === false) {
// Node.
foreach ($_POST['keys'] as $key => $value) {
db_process_sql_update(

View File

@ -111,11 +111,8 @@ if (enterprise_installed()) {
array_push($menu_tabs, $menu_tab_url);
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=hist_db').'">'.__('History database').'</a>';
array_push($menu_tabs, $menu_tab_url);
if ($config['log_collector']) {
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=log').'">'.__('Log collector').'</a>';
array_push($menu_tabs, $menu_tab_url);
}
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=log').'">'.__('Log collector').'</a>';
array_push($menu_tabs, $menu_tab_url);
}
$buttons['auth'] = [
@ -422,8 +419,14 @@ switch ($section) {
$help_header = '';
break;
case 'log':
$buttons['log']['active'] = true;
$subpage = __('Log Collector');
$help_header = 'opensearch_installation';
break;
default:
$subpage = 'seccion: ';
$subpage = '';
// Default.
break;
}
@ -432,7 +435,7 @@ $dots = dot_tab($menu_tabs);
// Header.
ui_print_standard_header(
__('Setup').' &raquo; '.$subpage,
$subpage,
'',
false,
$help_header,

View File

@ -56,11 +56,18 @@ try {
$status_values = $ITSM->getStatus();
$object_types_values = $ITSM->getObjectypes();
if ((bool) get_parameter('update_config', 0) === true) {
$ITSM_groups_agents_sync_base = null;
if (empty($config['ITSM_groups_agents_sync']) === false) {
$ITSM_groups_agents_sync_base = base64_encode($config['ITSM_groups_agents_sync']);
}
$set_config_inventories = $ITSM->createNode(
[
'serverAuth' => $config['server_unique_identifier'],
'apiPass' => $config['api_password'],
'serverAuth' => md5($config['server_unique_identifier']),
'apiPass' => md5($config['api_password']),
'agentsForExecution' => $config['ITSM_agents_sync'],
'groups' => $ITSM_groups_agents_sync_base,
'mode' => $config['ITSM_mode_agents_sync'],
'path' => $config['ITSM_public_url'],
'label' => array_keys(servers_get_names())[0],
'nodeId' => $config['metaconsole_node_id'],
@ -69,7 +76,7 @@ try {
}
try {
$node = $ITSM->getNode($config['server_unique_identifier']);
$node = $ITSM->getNode(md5($config['server_unique_identifier']));
} catch (\Throwable $th) {
$node = [];
}
@ -123,7 +130,7 @@ $table_remote->data['ITSM_user_level_conf'] = $row;
$row = [];
$row['hostname'] = html_print_label_input_block(
__('URL to Pandora ITSM setup').ui_print_help_tip(
__('Full URL to your Pandora ITSM setup (e.g., http://192.168.1.20/integria/api/v2).'),
__('Full URL (e.g., http://192.168.1.20/XXX/api/v2).'),
true
),
html_print_input_text(
@ -180,7 +187,7 @@ $button_test .= html_print_image(
'images/status_sets/default/severity_normal.png',
true
);
$button_test .= '&nbsp;'.__('Connection its OK').'</span>';
$button_test .= '&nbsp;'.__('Connection is OK').'</span>';
$button_test .= '<span id="ITSM-failure" class="invisible">&nbsp;';
$button_test .= html_print_image(
'images/status_sets/default/severity_critical.png',
@ -190,7 +197,7 @@ $button_test .= '&nbsp;'.__('Connection failed').'</span>';
$button_test .= '&nbsp;<span id="ITSM-message" class="invisible"></span>';
$row['control'] = html_print_label_input_block(
__('Test connection pandora to ITSM'),
__('Test connection PFMS to Pandora ITSM'),
$button_test,
['div_class' => 'ITSM-remote-setup-ITSM_token']
);
@ -206,8 +213,8 @@ if (empty($itsm_public_url) === true) {
}
$row['publicUrl'] = html_print_label_input_block(
__('URL conect to API %s', get_product_name()).ui_print_help_tip(
__('Full URL to your Pandora (e.g., http://192.168.1.20).'),
__('URL connect to API %s', get_product_name()).ui_print_help_tip(
__('Full URL (e.g., http://192.168.1.20/XXX/api/v2).'),
true
),
html_print_input_text(
@ -221,7 +228,7 @@ $row['publicUrl'] = html_print_label_input_block(
);
$row['agentsSync'] = html_print_label_input_block(
__('Number Agents to synchronize').ui_print_help_tip(
__('Number of Agents to synchronize').ui_print_help_tip(
__('Number of agents that will synchronize at the same time, minimum 10 max 1000'),
true
),
@ -237,6 +244,55 @@ $row['agentsSync'] = html_print_label_input_block(
$table_remote->data['ITSM_sync_inventory'] = $row;
$row = [];
$itsm_groups_agents_sync = [];
if (empty($config['ITSM_groups_agents_sync']) === false) {
$itsm_groups_agents_sync = json_decode(
io_safe_output($config['ITSM_groups_agents_sync']),
true
);
}
$mode_values = [
1 => __('Enable'),
2 => __('Disable'),
];
$row['modeAgentsSync'] = html_print_label_input_block(
__('Synchronize agents mode'),
html_print_select(
$mode_values,
'ITSM_mode_agents_sync',
$config['ITSM_mode_agents_sync'],
'',
__('All'),
0,
true,
false,
true,
'',
false
)
);
$row['groupsAgentsSync'] = html_print_label_input_block(
__('Agent groups to synchronize'),
html_print_select_groups(
false,
'AW',
false,
'ITSM_groups_agents_sync[]',
$itsm_groups_agents_sync,
'',
'',
'',
true,
true
)
);
$table_remote->data['ITSM_sync_inventory_filters'] = $row;
// Test.
$row = [];
$button_test_pandora = html_print_button(
@ -261,7 +317,7 @@ $button_test_pandora .= html_print_image(
'images/status_sets/default/severity_normal.png',
true
);
$button_test_pandora .= '&nbsp;'.__('Connection its OK').'</span>';
$button_test_pandora .= '&nbsp;'.__('Connection is OK').'</span>';
$button_test_pandora .= '<span id="ITSM-failure-pandora" class="invisible">&nbsp;';
$button_test_pandora .= html_print_image(
'images/status_sets/default/severity_critical.png',
@ -300,7 +356,7 @@ if (empty($node) === false) {
// $progressbar .= (empty($node['dateStart']) === false) ? human_time_comparation($node['dateStart']) : __('Never');
$row['control-test-pandora'] = html_print_label_input_block(
__('Progress agents to synch'),
__('Progress on agents to be synchronized'),
$progressbar
);
}

Some files were not shown because too many files have changed in this diff Show More