diff --git a/extras/deploy-scripts/deploy_ext_database_el8.sh b/extras/deploy-scripts/deploy_ext_database_el8.sh
index 7f68061fe5..67a65e19a3 100644
--- a/extras/deploy-scripts/deploy_ext_database_el8.sh
+++ b/extras/deploy-scripts/deploy_ext_database_el8.sh
@@ -15,7 +15,7 @@ LOGFILE="/tmp/deploy-ext-db-$(date +%F).log"
# define default variables
[ "$TZ" ] || TZ="Europe/Madrid"
-[ "$MYVER" ] || MYVER=57
+[ "$MYVER" ] || MYVER=80
[ "$DBHOST" ] || DBHOST=127.0.0.1
[ "$DBNAME" ] || DBNAME=pandora
[ "$DBUSER" ] || DBUSER=pandora
@@ -27,6 +27,7 @@ LOGFILE="/tmp/deploy-ext-db-$(date +%F).log"
[ "$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")
+
# Ansi color code variables
red="\e[0;91m"
green="\e[0;92m"
diff --git a/extras/deploy-scripts/pandora_deploy_community.sh b/extras/deploy-scripts/pandora_deploy_community.sh
index 9386d55647..d7973172aa 100644
--- a/extras/deploy-scripts/pandora_deploy_community.sh
+++ b/extras/deploy-scripts/pandora_deploy_community.sh
@@ -11,22 +11,25 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
-S_VERSION='2022050901'
+S_VERSION='202304111'
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
# define default variables
[ "$TZ" ] || TZ="Europe/Madrid"
[ "$DBHOST" ] || DBHOST=127.0.0.1
+[ "$MYVER" ] || MYVER=80
[ "$DBNAME" ] || DBNAME=pandora
[ "$DBUSER" ] || DBUSER=pandora
[ "$DBPASS" ] || DBPASS=pandora
[ "$DBPORT" ] || DBPORT=3306
+[ "$DBROOTUSER" ] || DBROOTUSER=root
[ "$DBROOTPASS" ] || DBROOTPASS=pandora
[ "$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_BETA" ] || PANDORA_BETA=0
+[ "$PANDORA_LTS" ] || PANDORA_LTS=1
# Ansi color code variables
red="\e[0;91m"
@@ -130,7 +133,10 @@ check_root_permissions
[ "$SKIP_PRECHECK" == 1 ] || check_pre_pandora
#advicing BETA PROGRAM
-[ "$PANDORA_BETA" -ne '0' ] && echo -e "${red}BETA version enable using nightly PandoraFMS packages${reset}"
+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
@@ -174,7 +180,15 @@ execute_cmd "yum-config-manager --enable remi-php80" "Configuring PHP"
# Install percona Database
#[ -f /etc/my.cnf ] && rm -rf /etc/my.cnf
-execute_cmd "yum install -y Percona-Server-server-57" "Installing Percona Server"
+
+if [ "$MYVER" -eq '80' ] ; then
+ execute_cmd "percona-release setup ps80 -y" "Enabling mysql80 module"
+ execute_cmd "yum install -y percona-server-server percona-xtrabackup-80" "Installing Percona Server 80"
+fi
+
+if [ "$MYVER" -ne '80' ] ; then
+ execute_cmd "yum install -y Percona-Server-server-57 percona-xtrabackup-24" "Installing Percona Server 57"
+fi
# Console dependencies
console_dependencies=" \
@@ -348,21 +362,32 @@ 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)
-echo """
- SET PASSWORD FOR 'root'@'localhost' = PASSWORD('Pandor4!');
- UNINSTALL PLUGIN validate_password;
- SET PASSWORD FOR 'root'@'localhost' = PASSWORD('$DBROOTPASS');
- """ | mysql --connect-expired-password -uroot &>> "$LOGFILE"
-fi
-export MYSQL_PWD=$DBROOTPASS
-echo -en "${cyan}Creating Pandora FMS database...${reset}"
-echo "create database $DBNAME" | mysql -uroot -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."
+ 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!';
+ UNINSTALL COMPONENT 'file://component_validate_password';
+ SET PASSWORD FOR '$DBROOTUSER'@'localhost' = '$DBROOTPASS';
+ """ | mysql --connect-expired-password -u$DBROOTUSER &>> "$LOGFILE"
+ fi
-echo "GRANT ALL PRIVILEGES ON $DBNAME.* TO \"$DBUSER\"@'%' identified by \"$DBPASS\"" | mysql -uroot -P$DBPORT -h$DBHOST
-export MYSQL_PWD=$DBPASS
+ if [ "$MYVER" -ne '80' ] ; then
+ echo """
+ SET PASSWORD FOR '$DBROOTUSER'@'localhost' = PASSWORD('Pandor4!');
+ UNINSTALL PLUGIN validate_password;
+ 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
@@ -401,6 +426,8 @@ query_cache_size = 64M
query_cache_min_res_unit = 2k
query_cache_limit = 256K
+#skip-log-bin
+
sql_mode=""
[mysqld_safe]
@@ -409,17 +436,35 @@ pid-file=/var/run/mysqld/mysqld.pid
EO_CONFIG_F
-execute_cmd "systemctl restart mysqld" "Configuring database engine"
+ if [ "$MYVER" -eq '80' ] ; then
+ sed -i -e "/query_cache.*/ s/^#*/#/g" /etc/my.cnf
+ sed -i -e "s/#skip-log-bin/skip-log-bin/g" /etc/my.cnf
+ sed -i -e "s/character-set-server=utf8/character-set-server=utf8mb4/g" /etc/my.cnf
+
+ fi
+
+ 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_BETA" -eq '0' ] ; then
+#Define packages
+if [ "$PANDORA_LTS" -eq '1' ] ; then
+ [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_server-7.0NG.noarch.rpm"
+ [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_console-7.0NG.noarch.rpm"
+ [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_agent_linux-7.0NG.noarch.rpm"
+elif [ "$PANDORA_LTS" -ne '1' ] ; then
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.noarch.rpm"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
-elif [ "$PANDORA_BETA" -ne '0' ] ; then
- [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm"
- [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://pandorafms.com/community/community-console-rpm-beta/"
- [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
+fi
+
+# if beta is enable
+if [ "$PANDORA_BETA" -eq '1' ] ; then
+ PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm"
+ PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_console-latest.noarch.rpm"
+ PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
fi
# Downloading Pandora Packages
diff --git a/extras/deploy-scripts/pandora_deploy_community_el8.sh b/extras/deploy-scripts/pandora_deploy_community_el8.sh
index 5e2d39ecbc..d217de2303 100644
--- a/extras/deploy-scripts/pandora_deploy_community_el8.sh
+++ b/extras/deploy-scripts/pandora_deploy_community_el8.sh
@@ -19,7 +19,7 @@ LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
# define default variables
[ "$TZ" ] || TZ="Europe/Madrid"
-[ "$MYVER" ] || MYVER=57
+[ "$MYVER" ] || MYVER=80
[ "$PHPVER" ] || PHPVER=8
[ "$DBHOST" ] || DBHOST=127.0.0.1
[ "$DBNAME" ] || DBNAME=pandora
diff --git a/extras/docker/centos8/base/Dockerfile b/extras/docker/centos8/base/Dockerfile
index 8106abf8ce..8b14fbb780 100644
--- a/extras/docker/centos8/base/Dockerfile
+++ b/extras/docker/centos8/base/Dockerfile
@@ -8,265 +8,135 @@ RUN dnf install -y --setopt=tsflags=nodocs \
dnf-utils \
http://rpms.remirepo.net/enterprise/remi-release-8.rpm
-RUN dnf module reset -y php && dnf module install -y php:remi-7.4
+RUN dnf module reset -y php && dnf module install -y php:remi-8.0
RUN dnf config-manager --set-enabled powertools
# Install console dependencies
RUN dnf install -y --setopt=tsflags=nodocs \
- php \
- 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 \
- libcroco \
- 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 \
- nfdump \
- xorg-x11-fonts-75dpi \
- xorg-x11-fonts-misc \
- poppler-data \
- php-yaml
+ 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 \
+ libcroco \
+ 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 \
+ libzstd \
+ openldap-clients \
+ http://firefly.artica.es/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \
+ http://firefly.artica.es/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \
+ http://firefly.artica.es/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
+ http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm \
+ http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm
RUN mkdir -p /run/php-fpm/ ; chown -R root:apache /run/php-fpm/
# Not installed perl-Net-Telnet gtk-update-icon-cach ghostscript-fonts
-# Install server dependencies
-
-RUN dnf install -y --setopt=tsflags=nodocs \
- GeoIP \
- GeoIP-GeoLite-data \
- dwz \
- efi-srpm-macros \
- ghc-srpm-macros \
- go-srpm-macros \
- ocaml-srpm-macros \
- openblas-srpm-macros \
- perl \
- perl-Algorithm-Diff \
- perl-Archive-Tar \
- perl-Archive-Zip \
- perl-Attribute-Handlers \
- perl-B-Debug \
- perl-CPAN \
- perl-CPAN-Meta \
- perl-CPAN-Meta-Requirements \
- perl-CPAN-Meta-YAML \
- perl-Compress-Bzip2 \
- perl-Config-Perl-V \
- perl-DBD-MySQL \
- perl-DBI \
- perl-DB_File \
- perl-Data-Dump \
- perl-Data-OptList \
- perl-Data-Section \
- perl-Devel-PPPort \
- perl-Devel-Peek \
- perl-Devel-SelfStubber \
- perl-Devel-Size \
- perl-Digest-HMAC \
- perl-Digest-SHA \
- perl-Encode-Locale \
- perl-Encode-devel \
- perl-Env \
- perl-ExtUtils-CBuilder \
- perl-ExtUtils-Command \
- perl-ExtUtils-Embed \
- perl-ExtUtils-Install \
- perl-ExtUtils-MM-Utils \
- perl-ExtUtils-MakeMaker \
- perl-ExtUtils-Manifest \
- perl-ExtUtils-Miniperl \
- perl-ExtUtils-ParseXS \
- perl-File-Fetch \
- perl-File-HomeDir \
- perl-File-Listing \
- perl-File-Which \
- perl-Filter \
- perl-Filter-Simple \
- perl-Geo-IP \
- perl-HTML-Parser \
- perl-HTML-Tagset \
- perl-HTML-Tree \
- perl-HTTP-Cookies \
- perl-HTTP-Date \
- perl-HTTP-Message \
- perl-HTTP-Negotiate \
- perl-IO-HTML \
- perl-IO-Socket-INET6 \
- perl-IO-Zlib \
- perl-IO-stringy \
- perl-IPC-Cmd \
- perl-IPC-SysV \
- perl-IPC-System-Simple \
- perl-JSON \
- perl-JSON-PP \
- perl-LWP-MediaTypes \
- perl-Locale-Codes \
- perl-Locale-Maketext \
- perl-Locale-Maketext-Simple \
- perl-MRO-Compat \
- perl-Math-BigInt \
- perl-Math-BigInt-FastCalc \
- perl-Math-BigRat \
- perl-Memoize \
- perl-Module-Build \
- perl-Module-CoreList \
- perl-Module-CoreList-tools \
- perl-Module-Load \
- perl-Module-Load-Conditional \
- perl-Module-Loaded \
- perl-Module-Metadata \
- perl-NTLM \
- perl-Net-HTTP \
- perl-Net-Ping \
- perl-NetAddr-IP \
- perl-Package-Generator \
- perl-Params-Check \
- perl-Params-Util \
- perl-Perl-OSType \
- perl-PerlIO-via-QuotedPrint \
- perl-Pod-Checker \
- perl-Pod-Html \
- perl-Pod-Parser \
- perl-SelfLoader \
- perl-Socket6 \
- perl-Software-License \
- perl-Sub-Exporter \
- perl-Sub-Install \
- perl-Sys-Syslog \
- perl-Test \
- perl-Test-Harness \
- perl-Test-Simple \
- perl-Text-Balanced \
- perl-Text-Diff \
- perl-Text-Glob \
- perl-Text-Template \
- perl-Thread-Queue \
- perl-Time-Piece \
- perl-TimeDate \
- perl-Try-Tiny \
- perl-Unicode-Collate \
- perl-WWW-RobotRules \
- perl-XML-NamespaceSupport \
- perl-XML-Parser \
- perl-XML-SAX \
- perl-XML-SAX-Base \
- perl-XML-Simple \
- perl-XML-Twig \
- perl-autodie \
- perl-bignum \
- perl-devel \
- perl-encoding \
- perl-experimental \
- perl-inc-latest \
- perl-libnetcfg \
- perl-libwww-perl \
- perl-local-lib \
- perl-open \
- perl-perlfaq \
- perl-srpm-macros \
- perl-utils \
- perl-version \
- python-srpm-macros \
- python3-pyparsing \
- python3-rpm-macros \
- qt5-srpm-macros \
- redhat-rpm-config \
- rust-srpm-macros \
- systemtap-sdt-devel \
- perl-TermReadKey \
- perl \
- perl-DBD-MySQL \
- perl-DBI \
- initscripts \
- vim \
- fping \
- perl-IO-Compress \
- perl-Time-HiRes \
- perl-Math-Complex \
- libnsl \
- mysql \
- java \
- net-snmp-utils \
- net-tools \
- nmap-ncat \
- nmap \
- net-snmp-utils \
- sudo \
- expect \
- openssh-clients \
- http://firefly.artica.es/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
- http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm
+# Install server dependencies
+RUN dnf install -y --setopt=tsflags=nodocs \
+ 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(Geo::IP)" \
+ "perl(IO::Socket::INET6)" \
+ "perl(XML::Twig)" \
+ expect \
+ openssh-clients \
+ java \
+ bind-utils \
+ whois \
+ libnsl \
+ http://firefly.artica.es/centos7/xprobe2-0.3-12.2.x86_64.rpm \
+ http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm \
+ https://firefly.artica.es/centos8/pandorawmic-1.0.0-1.x86_64.rpm ; dnf clean all
# Install utils
-RUN dnf install -y supervisor chromium crontabs http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm --setopt=tsflags=nodocs
+RUN dnf install -y supervisor mysql chromium crontabs http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm --setopt=tsflags=nodocs
# SDK VMware perl dependencies
RUN dnf install -y http://firefly.artica.es/centos8/perl-Crypt-OpenSSL-AES-0.02-1.el8.x86_64.rpm http://firefly.artica.es/centos8/perl-Crypt-SSLeay-0.73_07-1.gf.el8.x86_64.rpm perl-Net-HTTP perl-libwww-perl openssl-devel perl-Crypt-CBC perl-Bytes-Random-Secure perl-Crypt-Random-Seed perl-Math-Random-ISAAC perl-JSON http://firefly.artica.es/centos8/VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.rpm
# Instant client Oracle
RUN dnf install -y https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-basic-19.8.0.0.0-1.x86_64.rpm https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-sqlplus-19.8.0.0.0-1.x86_64.rpm
+# Install IPAM dependencies
+RUN dnf install -y http://firefly.artica.es/centos7/xprobe2-0.3-12.2.x86_64.rpm "perl(NetAddr::IP)" "perl(Sys::Syslog)" "perl(DBI)" "perl(XML::Simple)" "perl(Geo::IP)" "perl(IO::Socket::INET6)" "perl(XML::Twig)" "perl(DBD::mysql)" --setopt=tsflags=nodocs
EXPOSE 80 443 41121 162/udp
diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 5570e25e2c..8a643c8532 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.770-230412
+Version: 7.0NG.770-230417
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh
index 1edee92725..203f99def7 100644
--- a/pandora_agents/unix/DEBIAN/make_deb_package.sh
+++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.770-230412"
+pandora_version="7.0NG.770-230417"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index b164b69d5a..98306f5535 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -1023,7 +1023,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.770';
-use constant AGENT_BUILD => '230412';
+use constant AGENT_BUILD => '230417';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index 8efb003cf0..67f743d263 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.770
-%define release 230412
+%define release 230417
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index 503342fb30..3c6d9cdf07 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.770
-%define release 230412
+%define release 230417
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer
index 72156e0aa2..63863c3008 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.770"
-PI_BUILD="230412"
+PI_BUILD="230417"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf
index d9368d308c..7543515ba8 100644
--- a/pandora_agents/win32/bin/pandora_agent.conf
+++ b/pandora_agents/win32/bin/pandora_agent.conf
@@ -1,496 +1,526 @@
-# Base config file for Pandora FMS Windows Agent
-# (c) 2006-2021 Artica Soluciones Tecnologicas
+# Base config file for Pandora FMS Windows Agent
+# (c) 2006-2023 Pandora FMS
# Version 7.0NG.770
-# This program is Free Software, you can redistribute it and/or modify it
-# under the terms of the GNU General Public Licence as published by the Free Software
-# Foundation; either version 2 of the Licence or any later version
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY, without ever the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE
-
-# Edit this file to change your parameters or/and add your own modules
-# Any line with a # character at the first column will be ignored (comment)
-
-# General Parameters
-# ==================
-
-# NOTE: The variables $*$ will be substituted in the installation wizard
-
-server_ip $ServerIP$
-server_path /var/spool/pandora/data_in
-temporal "%ProgramFiles%\pandora_agent\temp"
-
-# Group assigned for this agent (descriptive, p.e: Servers)
-group $GroupName$
-
-# If set to 1 allows the agent to be configured via the web console
-# (only works on enterprise version). Set to 0 to disable it
-remote_config 0
-
-#include "C:\Archivos de programa\pandora_agent\pandora_agent_alt.conf"
-#broker_agent name_agent
-
-# Agent uses your hostname automatically, if you need to change agent name
-# use directive agent_name (do not use blank spaces, please).
-# This parameter is CASE SENSITIVE.
-
-# agent_name My_Custom_Agent_name
-
-# To define agent name by specific command, define 'agent_name_cmd'.
-# If agent_name_cmd is defined, agent_name is ignored.
-# (In the following example, agent name is 'hostname_IP')
-# If set to __rand__ the agent will generate a random name.
-#agent_name_cmd cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\agentname.vbs"
-agent_name_cmd __rand__
-
-# Agent alias. Name should be unique rather than alias. Hostname by default
-# agent_alias $Alias$
-
-#Parent agent_name
-#parent_agent_name caprica
-
-# address: Enforce to server a ip address to this agent
-# You can also try to detect the first IP using "auto", for example
-address auto
-# or setting a fixed IP address, like for example:
-#address 192.168.36.73
-
-# This limits operation if temporal dir has not enough free disk (in megabytes).
-#temporal_min_size 1024
-
+# This program is Free Software, you can redistribute it and/or modify it
+# under the terms of the GNU General Public Licence as published by the Free Software
+# Foundation; either version 2 of the Licence or any later version
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, without ever the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE
+
+# Edit this file to change your parameters or/and add your own modules
+# Any line with a # character at the first column will be ignored (comment)
+
+# General Parameters
+# ==================
+
+# NOTE: The variables $*$ will be substituted in the installation wizard
+
+server_ip $ServerIP$
+server_path /var/spool/pandora/data_in
+temporal "%ProgramFiles%\pandora_agent\temp"
+
+# Group assigned for this agent (descriptive, p.e: Servers)
+group $GroupName$
+
+# If set to 1 allows the agent to be configured via the web console
+# (only works on enterprise version). Set to 0 to disable it
+remote_config 0
+
+#include "C:\Archivos de programa\pandora_agent\pandora_agent_alt.conf"
+#broker_agent name_agent
+
+# Agent uses your hostname automatically, if you need to change agent name
+# use directive agent_name (do not use blank spaces, please).
+# This parameter is CASE SENSITIVE.
+
+# agent_name My_Custom_Agent_name
+
+# To define agent name by specific command, define 'agent_name_cmd'.
+# If agent_name_cmd is defined, agent_name is ignored.
+# (In the following example, agent name is 'hostname_IP')
+# If set to __rand__ the agent will generate a random name.
+#agent_name_cmd cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\agentname.vbs"
+agent_name_cmd __rand__
+
+# Agent alias. Name should be unique rather than alias. Hostname by default
+# agent_alias $Alias$
+
+#Parent agent_name
+#parent_agent_name caprica
+
+# address: Enforce to server a ip address to this agent
+# You can also try to detect the first IP using "auto", for example
+address auto
+# or setting a fixed IP address, like for example:
+#address 192.168.36.73
+
+# This limits operation if temporal dir has not enough free disk (in megabytes).
+#temporal_min_size 1024
+
# Maximum size (in megabytes) allowed for the XML buffer.
-temporal_max_size 1024
-
+temporal_max_size 1024
+
# Maximum number of files allowed for the XML buffer.
-temporal_max_files 1024
-
-# Delay start execution X second before start to monitoring nothing
-#startup_delay 30
-
-# Interval is defined in seconds
-interval 300
-
-# tranfer_modes: Possible values are local, tentacle (default), ftp and ssh.
-transfer_mode tentacle
-server_port 41121
-
-# timeout in seconds for file transfer programs execution (30 by default)
-#transfer_timeout 30
-
-# In case of using FTP or tentacle with password. User is always "pandora"
-#server_pwd pandora
-
-# Extra options for the Tentacle client (for example: server_opts -v -r 5).
-#server_opts
-
-# If set to 1 disables log writing into pandora_agent.log
-#disable_logfile 1
-
-# Debug mode renames XML in the temp folder and continues running
-# debug 1
-
-# Default 0, set to 1 to avoid module executions and report to server
-# standby 1
-
-# XML encoding (ISO-8859-1 by default). Most windows servers experience problems when you set to UTF-8. Other special codepages may be specified here.
-#encoding ISO-8859-1
-
-# If set to 1 start Drone Agent's Proxy Mode
-# proxy_mode 1
-
-# Max number of simultaneus connection for proxy (by default 10)
-# proxy_max_connection 10
-
-# Proxy timeout (by default 1s)
-# proxy_timeout 1
-
-# Address the proxy will listen on.
-#proxy_address 0.0.0.0
-
-# Port the proxy will listen on.
-#proxy_port 41121
-
-# Enable or disable XML buffer.
-xml_buffer 1
-
-# Agent mode: Learn (default), No-learn, Autodisable
-# agent_mode autodisable
-
-# EHorus configuration file default full path.
-#It try to find the EKID and set it like a custom field.
-ehorus_conf "C:\Program Files\ehorus_agent\ehorus_agent.conf"
-
-# Secondary groups. You can select several groups separated by comma.
-# secondary_groups Group1,Group2
-
-# Secondary server configuration
-# ==============================
-
-# If secondary_mode is set to on_error, data files are copied to the secondary
-# server only if the primary server fails. If set to always, data files are
-# always copied to the secondary server.
-#secondary_mode on_error
-#secondary_server_ip localhost
-#secondary_server_path /var/spool/pandora/data_in
-#secondary_server_port 41121
-#secondary_transfer_mode tentacle
-#secondary_transfer_timeout 30
-#secondary_server_pwd mypassword
-#secondary_server_ssl no
-#secondary_server_opts
-
-# Example UDP server to be able to execute remote actions such
-# as starting or stopping process.
-#udp_server 1
-#udp_server_port 4321
-#udp_server_auth_address 192.168.1.23
-#process_firefox_start firefox
-#process_firefox_stop killall firefox
-#service_messenger 1
-
-###############################################
-# Module Definition
-# Check online documentation and module library at http://pandorafms.org
-# =================
-
-# CPU Load using WMI
-module_begin
-module_name CPU Load
-module_type generic_data
-module_wmiquery SELECT LoadPercentage FROM Win32_Processor
-module_wmicolumn LoadPercentage
-module_max 100
-module_min 0
-module_description User CPU Usage (%)
-module_min_warning 70
-module_max_warning 90
-module_min_critical 91
-module_max_critical 100
-module_unit %
-module_group System
-module_end
-
-# Basic info about TCP Connection
-module_begin
-module_name TCP_Connections
-module_type generic_data
-module_exec netstat -an | find /c /v "estab"
-module_description Total number of TCP connections active
-module_group Networking
-module_end
-
-# Example plugin to retrieve drive usage
-module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\df_percent_used.vbs"
-
-# Example plugin to retrieve memory usage
-module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\mem_percent_used.vbs"
-
-# Example plugin to retrieve network usage
-module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\network.vbs"
-
-## Windows inventory module (This information will be displayed only in enterprise version)
-## Please check the WMI is healthy before activate this functionality
-
-#module_begin
-#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\cpuinfo.vbs"
-#module_crontab * 12-15 * * 1
-#module_end
-
-#module_begin
-#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\moboinfo.vbs"
-#module_crontab * 12-15 * * 1
-#module_end
-
-#module_begin
-#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\diskdrives.vbs"
-#module_crontab * 12-15 * * 1
-#module_end
-
-#module_begin
-#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\cdromdrives.vbs"
-#module_crontab * 12-15 * * 1
-#module_end
-
-#module_begin
-#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\videocardinfo.vbs"
-#module_crontab * 12-15 * * 1
-#module_end
-
-#module_begin
-#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\ifaces.vbs"
-#module_crontab * 12-15 * * 1
-#module_end
-
-#module_begin
-#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\monitors.vbs"
-#module_crontab * 12-15 * * 1
-#module_end
-
-#module_begin
-#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\printers.vbs"
-#module_crontab * 12-15 * * 1
-#module_end
-
-#module_begin
-#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\raminfo.vbs"
-#module_crontab * 12-15 * * 1
-#module_end
-
-#module_begin
-#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\software_installed.vbs"
-#module_crontab * 12-15 * * 1
-#module_end
-
-#module_begin
-#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\userslogged.vbs"
-#module_crontab * 12-15 * * 1
-#module_end
-
-#module_begin
-#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\productkey.vbs"
-#module_crontab * 12-15 * * 1
-#module_end
-
-#module_begin
-#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\productID.vbs"
-#module_crontab * 12-15 * * 1
-#module_end
-
-# Service autodiscovery plugin
-module_plugin "%PROGRAMFILES%\Pandora_Agent\util\autodiscover.exe" --default
-
-
-#########################################
-# EXAMPLES #
-#########################################
-
-# Example: get Network information using Agent plugin
-#module_plugin cscript //B "%ProgramFiles%\Pandora_Agent\util\nettraffic.vbs"
-
-# External inventory plugin
-#module_begin
-#module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\software_installed.vbs"
-#module_interval 288
-## 288 x 5min = 24 hr, one execution per day, using module_interval
-#module_end
-
-# Free Memory
-#module_begin
-#module_name FreeMemory
-#module_type generic_data
-#module_freepercentmemory
-#module_description Free memory (%).
-#module_min_warning 21
-#module_max_warning 30
-#module_min_critical 0
-#module_max_critical 20
-#module_end
-
-# Log events
-#module_begin
-#module_name System Events (TermService)
-#module_type async_string
-#module_logevent
-#module_description Log Events coming from Terminal Service
-#module_source System
-#module_application TermService
-#module_end
-
-#module_begin
-#module_name Security Events (Invalid Login)
-#module_type async_string
-#module_description Security log events for invalid login attempt
-#module_logevent
-#module_source Security
-#module_eventcode 529
-#module_end
-
-# Check if Dhcp service is enabled
-#module_begin
-#module_name DHCP Enabled
-#module_type generic_proc
-#module_service Dhcp
-#module_description Check DCHP service enabled
-#module_end
-
-#Antivirus monitoring
-#This modules checks the antivirus is running on your system, if there is and antivirus
-#This module gets the last date the signature file was updated and send this date to pandora.
-#module_begin
-#module_name Antivirus Last Update
-#module_type async_string
-#module_precondition =~ avguard.exe cmd.exe /c tasklist | grep avguard.exe | gawk "{print $1}"
-#module_exec dir "%ProgramFiles%\Avira\AntiVir Desktop\aevdf.dat" | grep aevdf.dat | gawk "{print $1\" \"$2}"
-#module_description Last update for Antivirus Signature file
-#module_end
-
-# Number processes
-#module_begin
-#module_name Number processes
-#module_type generic_data
-#module_exec tasklist | gawk "NR > 3 {print$0}" | wc -l
-#module_description Number of processes running
-#module_min_warning 175
-#module_max_warning 249
-#module_min_critical 250
-#module_max_critical 300
-#module_end
-
-# Example plugin to retrieve drive usage
-#module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\df.vbs"
-
-# Free space on disk C: (%)
-#module_begin
-#module_name FreeDiskC
-#module_type generic_data
-#module_freepercentdisk C:
-#module_description Free space on drive C: (%)
-#module_min_warning 31
-#module_max_warning 40
-#module_min_critical 0
-#module_max_critical 30
-#module_end
-
-# CPU usage percentage
-#module_begin
-#module_name CPUUse
-#module_type generic_data
-#module_cpuusage all
-#module_description CPU# usage
-#module_min_warning 70
-#module_max_warning 90
-#module_min_critical 91
-#module_max_critical 100
-#module_end
-
-# Free space on disk D: (%)
-# module_begin
-# module_name FreeDiskD
-# module_type generic_data
-# module_freepercentdisk D:
-# module_description Free space on drive D: (%)
-# module_end
-
-## Plugin example for custom fields (version, architecture, IP, IPv6, MAC)
-# module_begin
-# module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\win_cf.vbs"
-# module_crontab * 12-15 * * 1
-# module_end
-
-# Example plugin to retrieve last 5 min events in log4x format
-# module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\logevent_log4x.vbs" Aplicacion System 300
-
-# Sample on how to get a value from registry
-# This returns the last time user launch microsoft Windows update
-#module_begin
-#module_name Windows_Update_LastRun
-#module_type generic_data_string
-#module_exec getreg LM "SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" SetupWizardLaunchTime
-#module_description Last date and time user launch microsoft Windows update
-#module_end
-
-# Example of a remote TCP check
-#module_begin
-#module_name Google Port 80
-#module_type generic_proc
-#module_tcpcheck http://www.google.com
-#module_port 80
-#module_timeout 5
-#module_description Check local port 80
-#module_end
-
-# Example of regexp matching
-#module_begin
-#module_name PandoraAgent_log
-#module_type generic_data_string
-#module_regexp C:\archivos de programa\pandora_agent\pandora_agent.log
-#module_description This module will return all lines from the specified logfile
-#module_pattern .*
-#module_end
-
-# Get processor time from Performance Counter (SPANISH only, check your
-# locale string) using the Windows Performance tool to
-# identify proper PerCounter strings. Check documentation for detailed steps.
-#module_begin
-#module_name Processor_Time
-#module_type generic_data
-#module_perfcounter \Procesador(_Total)\% de tiempo de procesador
-#module_end
-
-# Example of module exec, used to know about the memory used by pandora process
-# grep.exe and gawk.exe are included in the util directory of the agent.
-#module_begin
-#module_name PandoraFMS RAM
-#module_type generic_data
-#module_exec tasklist | grep Pandora | gawk "{ print $5 }" | tr -d "."
-#module_end
-
-# Example of module exec, used get number of active terminal services sessions
-# Works on Windows 2003. In Windows XP the query.exe and quser.exe files were
-# moved to %WINDIR%\system32\dllcache. If XP, copy the exe to %WINDIR%\system32
-#module_begin
-#module_name Active TS Sessions
-#module_type generic_data_string
-#module_exec query session | grep Activ | gawk "{ print $2 }" |wc -l
-#module_description Number of active TS Sessions
-#module_end
-
-# Example of watchdog process opening it if it gets closed
-# NOTE: This need to enable "Service can interactuate with the deskop" option
-# in the Pandora FMS Service configuration (Windows Service Control management).
-#module_begin
-#module_name TaskManager
-#module_type generic_proc
-#module_proc taskmgr.exe
-#module_description This keeps taskmgr always running in the system
-#module_async yes
-#module_watchdog yes
-#module_start_command c:\windows\system32\taskmgr.exe
-#module_end
-
-# Example of watchdog service opening it if it gets closed
-#module_begin
-#module_name ServiceVNC_Server
-#module_type generic_proc
-#module_service winvnc
-#module_description Service VNC Server watchdog/service
-#module_async yes
-#module_watchdog yes
-#module_end
-
-# Example of preconditions
-#module_begin
-#module_name Test Precondicion
-#module_type generic_data
-#module_precondition < 10 cmd.exe /c echo 5
-#module_precondition > 10 cmd.exe /c echo 15
-#module_precondition = 10 cmd.exe /c echo 10
-#module_precondition != 10 cmd.exe /c echo 5
-#module_precondition =~ 10 cmd.exe /c echo 10
-#module_precondition (5,15) cmd.exe /c echo 10
-#module_freepercentmemory
-#module_description Precondition test module
-#module_end
-
-# Example of postconditions
-#module_begin
-#module_name Test Postcondicion
-#module_type generic_data
-#module_condition < 10 cmd.exe /c echo min >> c:\log.txt
-#module_condition > 3 cmd.exe /c echo max >> c:\log.txt
-#module_condition = 5 cmd.exe /c echo equal >> c:\log.txt
-#module_condition != 10 cmd.exe /c echo diff >> c:\log.txt
-#module_condition =~ 5 cmd.exe /c echo regexp >> c:\log.txt
-#module_condition (3,8) cmd.exe /c echo range >> c:\log.txt
-#module_exec echo 5
-#module_description Postcondition test module
-#module_end
-
-# Example of native encoding.
-#module_begin
-#module_name Written Accent
-#module_type generic_data_string
-#module_exec echo Bordón
-#module_native_encoding OEM
-#module_end
-
+temporal_max_files 1024
+
+# Delay start execution X second before start to monitoring nothing
+#startup_delay 30
+
+# Interval is defined in seconds
+interval 300
+
+# tranfer_modes: Possible values are local, tentacle (default), ftp and ssh.
+transfer_mode tentacle
+server_port 41121
+
+# timeout in seconds for file transfer programs execution (30 by default)
+#transfer_timeout 30
+
+# In case of using FTP or tentacle with password. User is always "pandora"
+#server_pwd pandora
+
+# Extra options for the Tentacle client (for example: server_opts -v -r 5).
+#server_opts
+
+# If set to 1 disables log writing into pandora_agent.log
+#disable_logfile 1
+
+# Debug mode renames XML in the temp folder and continues running
+# debug 1
+
+# Default 0, set to 1 to avoid module executions and report to server
+# standby 1
+
+# XML encoding (ISO-8859-1 by default). Most windows servers experience problems when you set to UTF-8. Other special codepages may be specified here.
+#encoding ISO-8859-1
+
+# If set to 1 start Drone Agent's Proxy Mode
+# proxy_mode 1
+
+# Max number of simultaneus connection for proxy (by default 10)
+# proxy_max_connection 10
+
+# Proxy timeout (by default 1s)
+# proxy_timeout 1
+
+# Address the proxy will listen on.
+#proxy_address 0.0.0.0
+
+# Port the proxy will listen on.
+#proxy_port 41121
+
+# Enable or disable XML buffer.
+xml_buffer 1
+
+# Agent mode: Learn (default), No-learn, Autodisable
+# agent_mode autodisable
+
+# EHorus configuration file default full path.
+#It try to find the EKID and set it like a custom field.
+ehorus_conf "C:\Program Files\ehorus_agent\ehorus_agent.conf"
+
+# Secondary groups. You can select several groups separated by comma.
+# secondary_groups Group1,Group2
+
+# Secondary server configuration
+# ==============================
+
+# If secondary_mode is set to on_error, data files are copied to the secondary
+# server only if the primary server fails. If set to always, data files are
+# always copied to the secondary server.
+#secondary_mode on_error
+#secondary_server_ip localhost
+#secondary_server_path /var/spool/pandora/data_in
+#secondary_server_port 41121
+#secondary_transfer_mode tentacle
+#secondary_transfer_timeout 30
+#secondary_server_pwd mypassword
+#secondary_server_ssl no
+#secondary_server_opts
+
+# Example UDP server to be able to execute remote actions such
+# as starting or stopping process.
+#udp_server 1
+#udp_server_port 4321
+#udp_server_auth_address 192.168.1.23
+#process_firefox_start firefox
+#process_firefox_stop killall firefox
+#service_messenger 1
+
+###############################################
+# Module Definition
+# Check online documentation and module library at http://pandorafms.org
+# =================
+
+# CPU Load using WMI
+module_begin
+module_name CPU Load
+module_type generic_data
+module_wmiquery SELECT LoadPercentage FROM Win32_Processor
+module_wmicolumn LoadPercentage
+module_max 100
+module_min 0
+module_description User CPU Usage (%)
+module_min_warning 70
+module_max_warning 90
+module_min_critical 91
+module_max_critical 100
+module_unit %
+module_group System
+module_end
+
+# Basic info about TCP Connection
+module_begin
+module_name TCP_Connections
+module_type generic_data
+module_exec netstat -an | find /c /v "estab"
+module_description Total number of TCP connections active
+module_group Networking
+module_end
+
+# Example plugin to retrieve drive usage
+module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\df_percent_used.vbs"
+
+# Example plugin to retrieve memory usage
+module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\mem_percent_used.vbs"
+
+# Example plugin to retrieve network usage
+module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\network.vbs"
+
+## Windows inventory module (This information will be displayed only in enterprise version)
+## Please check the WMI is healthy before activate this functionality
+
+#module_begin
+#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\cpuinfo.vbs"
+#module_crontab * 12-15 * * 1
+#module_end
+
+#module_begin
+#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\moboinfo.vbs"
+#module_crontab * 12-15 * * 1
+#module_end
+
+#module_begin
+#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\diskdrives.vbs"
+#module_crontab * 12-15 * * 1
+#module_end
+
+#module_begin
+#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\cdromdrives.vbs"
+#module_crontab * 12-15 * * 1
+#module_end
+
+#module_begin
+#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\videocardinfo.vbs"
+#module_crontab * 12-15 * * 1
+#module_end
+
+#module_begin
+#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\ifaces.vbs"
+#module_crontab * 12-15 * * 1
+#module_end
+
+#module_begin
+#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\monitors.vbs"
+#module_crontab * 12-15 * * 1
+#module_end
+
+#module_begin
+#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\printers.vbs"
+#module_crontab * 12-15 * * 1
+#module_end
+
+#module_begin
+#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\raminfo.vbs"
+#module_crontab * 12-15 * * 1
+#module_end
+
+#module_begin
+#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\software_installed.vbs"
+#module_crontab * 12-15 * * 1
+#module_end
+
+#module_begin
+#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\userslogged.vbs"
+#module_crontab * 12-15 * * 1
+#module_end
+
+#module_begin
+#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\productkey.vbs"
+#module_crontab * 12-15 * * 1
+#module_end
+
+#module_begin
+#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\productID.vbs"
+#module_crontab * 12-15 * * 1
+#module_end
+
+# Service autodiscovery plugin
+# Services monitored by default: MySQL, postgresql, pgsql, oracle, MSSQL, IISADMIN, apache,
+# nginx, W3svc, NTDS, Netlogon, DNS, MSExchangeADTopology, MSExchangeServiceHost, MSExchangeSA, MSExchangeTransport
+module_plugin "%PROGRAMFILES%\Pandora_Agent\util\autodiscover.exe" --default
+
+
+#########################################
+# EXAMPLES #
+#########################################
+
+# Example: Show a snapshot (screencapture) of a command
+#module_begin
+#module_name ProcessList Snapshot
+#module_exec tasklist
+#module_type generic_data_string
+#module_end
+
+# Get logs from System source. Need enterprise version.
+#module_begin
+#module_name Eventlog_System
+#module_type log
+#module_logevent
+#module_source System
+#module_end
+
+# Get logs from Security source. Need enterprise version.
+#module_begin
+#module_name Eventlog_Security
+#module_type log
+#module_logevent
+#module_source Security
+#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"
+
+# External inventory plugin
+#module_begin
+#module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\software_installed.vbs"
+#module_interval 288
+## 288 x 5min = 24 hr, one execution per day, using module_interval
+#module_end
+
+# Free Memory
+#module_begin
+#module_name FreeMemory
+#module_type generic_data
+#module_freepercentmemory
+#module_description Free memory (%).
+#module_min_warning 21
+#module_max_warning 30
+#module_min_critical 0
+#module_max_critical 20
+#module_end
+
+# Log events
+#module_begin
+#module_name System Events (TermService)
+#module_type async_string
+#module_logevent
+#module_description Log Events coming from Terminal Service
+#module_source System
+#module_application TermService
+#module_end
+
+#module_begin
+#module_name Security Events (Invalid Login)
+#module_type async_string
+#module_description Security log events for invalid login attempt
+#module_logevent
+#module_source Security
+#module_eventcode 529
+#module_end
+
+# Check if Dhcp service is enabled
+#module_begin
+#module_name DHCP Enabled
+#module_type generic_proc
+#module_service Dhcp
+#module_description Check DCHP service enabled
+#module_end
+
+#Antivirus monitoring
+#This modules checks the antivirus is running on your system, if there is and antivirus
+#This module gets the last date the signature file was updated and send this date to pandora.
+#module_begin
+#module_name Antivirus Last Update
+#module_type async_string
+#module_precondition =~ avguard.exe cmd.exe /c tasklist | grep avguard.exe | gawk "{print $1}"
+#module_exec dir "%ProgramFiles%\Avira\AntiVir Desktop\aevdf.dat" | grep aevdf.dat | gawk "{print $1\" \"$2}"
+#module_description Last update for Antivirus Signature file
+#module_end
+
+# Number processes
+#module_begin
+#module_name Number processes
+#module_type generic_data
+#module_exec tasklist | gawk "NR > 3 {print$0}" | wc -l
+#module_description Number of processes running
+#module_min_warning 175
+#module_max_warning 249
+#module_min_critical 250
+#module_max_critical 300
+#module_end
+
+# Example plugin to retrieve drive usage
+#module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\df.vbs"
+
+# Free space on disk C: (%)
+#module_begin
+#module_name FreeDiskC
+#module_type generic_data
+#module_freepercentdisk C:
+#module_description Free space on drive C: (%)
+#module_min_warning 31
+#module_max_warning 40
+#module_min_critical 0
+#module_max_critical 30
+#module_end
+
+# CPU usage percentage
+#module_begin
+#module_name CPUUse
+#module_type generic_data
+#module_cpuusage all
+#module_description CPU# usage
+#module_min_warning 70
+#module_max_warning 90
+#module_min_critical 91
+#module_max_critical 100
+#module_end
+
+# Free space on disk D: (%)
+# module_begin
+# module_name FreeDiskD
+# module_type generic_data
+# module_freepercentdisk D:
+# module_description Free space on drive D: (%)
+# module_end
+
+## Plugin example for custom fields (version, architecture, IP, IPv6, MAC)
+# module_begin
+# module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\win_cf.vbs"
+# module_crontab * 12-15 * * 1
+# module_end
+
+# Sample on how to get a value from registry
+# This returns the last time user launch microsoft Windows update
+#module_begin
+#module_name Windows_Update_LastRun
+#module_type generic_data_string
+#module_exec getreg LM "SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" SetupWizardLaunchTime
+#module_description Last date and time user launch microsoft Windows update
+#module_end
+
+# Example of a remote TCP check
+#module_begin
+#module_name Google Port 80
+#module_type generic_proc
+#module_tcpcheck http://www.google.com
+#module_port 80
+#module_timeout 5
+#module_description Check local port 80
+#module_end
+
+# Example of regexp matching
+#module_begin
+#module_name PandoraAgent_log
+#module_type generic_data_string
+#module_regexp C:\archivos de programa\pandora_agent\pandora_agent.log
+#module_description This module will return all lines from the specified logfile
+#module_pattern .*
+#module_end
+
+# Get processor time from Performance Counter (SPANISH only, check your
+# locale string) using the Windows Performance tool to
+# identify proper PerCounter strings. Check documentation for detailed steps.
+#module_begin
+#module_name Processor_Time
+#module_type generic_data
+#module_perfcounter \Procesador(_Total)\% de tiempo de procesador
+#module_end
+
+# Example of module exec, used to know about the memory used by pandora process
+# grep.exe and gawk.exe are included in the util directory of the agent.
+#module_begin
+#module_name PandoraFMS RAM
+#module_type generic_data
+#module_exec tasklist | grep Pandora | gawk "{ print $5 }" | tr -d "."
+#module_end
+
+# Example of module exec, used get number of active terminal services sessions
+# Works on Windows 2003. In Windows XP the query.exe and quser.exe files were
+# moved to %WINDIR%\system32\dllcache. If XP, copy the exe to %WINDIR%\system32
+#module_begin
+#module_name Active TS Sessions
+#module_type generic_data_string
+#module_exec query session | grep Activ | gawk "{ print $2 }" |wc -l
+#module_description Number of active TS Sessions
+#module_end
+
+# Example of watchdog process opening it if it gets closed
+# NOTE: This need to enable "Service can interactuate with the deskop" option
+# in the Pandora FMS Service configuration (Windows Service Control management).
+#module_begin
+#module_name TaskManager
+#module_type generic_proc
+#module_proc taskmgr.exe
+#module_description This keeps taskmgr always running in the system
+#module_async yes
+#module_watchdog yes
+#module_start_command c:\windows\system32\taskmgr.exe
+#module_end
+
+# Example of watchdog service opening it if it gets closed
+#module_begin
+#module_name ServiceVNC_Server
+#module_type generic_proc
+#module_service winvnc
+#module_description Service VNC Server watchdog/service
+#module_async yes
+#module_watchdog yes
+#module_end
+
+# Example of preconditions
+#module_begin
+#module_name Test Precondicion
+#module_type generic_data
+#module_precondition < 10 cmd.exe /c echo 5
+#module_precondition > 10 cmd.exe /c echo 15
+#module_precondition = 10 cmd.exe /c echo 10
+#module_precondition != 10 cmd.exe /c echo 5
+#module_precondition =~ 10 cmd.exe /c echo 10
+#module_precondition (5,15) cmd.exe /c echo 10
+#module_freepercentmemory
+#module_description Precondition test module
+#module_end
+
+# Example of postconditions
+#module_begin
+#module_name Test Postcondicion
+#module_type generic_data
+#module_condition < 10 cmd.exe /c echo min >> c:\log.txt
+#module_condition > 3 cmd.exe /c echo max >> c:\log.txt
+#module_condition = 5 cmd.exe /c echo equal >> c:\log.txt
+#module_condition != 10 cmd.exe /c echo diff >> c:\log.txt
+#module_condition =~ 5 cmd.exe /c echo regexp >> c:\log.txt
+#module_condition (3,8) cmd.exe /c echo range >> c:\log.txt
+#module_exec echo 5
+#module_description Postcondition test module
+#module_end
+
+# Example of native encoding.
+#module_begin
+#module_name Written Accent
+#module_type generic_data_string
+#module_exec echo Bordón
+#module_native_encoding OEM
+#module_end
+
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 73e35fd598..8c85cc5edd 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{230412}
+{230417}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index a82756542c..677806c2a5 100644
--- a/pandora_agents/win32/pandora.cc
+++ b/pandora_agents/win32/pandora.cc
@@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
-#define PANDORA_VERSION ("7.0NG.770 Build 230412")
+#define PANDORA_VERSION ("7.0NG.770 Build 230417")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 36f74189f3..edde187feb 100644
--- a/pandora_agents/win32/versioninfo.rc
+++ b/pandora_agents/win32/versioninfo.rc
@@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
- VALUE "ProductVersion", "(7.0NG.770(Build 230412))"
+ VALUE "ProductVersion", "(7.0NG.770(Build 230417))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 5f17b71e4d..a429902fd5 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.770-230412
+Version: 7.0NG.770-230417
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh
index f04a8894df..b807d99a40 100644
--- a/pandora_console/DEBIAN/make_deb_package.sh
+++ b/pandora_console/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.770-230412"
+pandora_version="7.0NG.770-230417"
package_pear=0
package_pandora=1
diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php
index e1e462a823..bd5d791b96 100755
--- a/pandora_console/general/login_page.php
+++ b/pandora_console/general/login_page.php
@@ -117,12 +117,12 @@ if (empty($config['random_background']) === false) {
unset($random_backgrounds[0], $random_backgrounds[1]);
$random_background = array_rand($random_backgrounds);
$background_url = 'images/backgrounds/random_backgrounds/'.$random_backgrounds[$random_background];
- $background_100 = 'background-size: 100% 100% !important; ';
+ $background_100 = 'background-size: cover !important; background-position: center !important; ';
}
if (empty($config['login_background']) === false) {
$background_url = 'images/backgrounds/'.$config['login_background'];
- $background_100 = 'background-size: 100% 100% !important; ';
+ $background_100 = 'background-size: cover !important; background-position: center !important; ';
}
// Support for Internet Explorer and Microsoft Edge browsers
diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php
index d84800e984..5f716f571d 100644
--- a/pandora_console/godmode/agentes/agent_manager.php
+++ b/pandora_console/godmode/agentes/agent_manager.php
@@ -636,7 +636,8 @@ $tableAdvancedAgent->data['secondary_groups'][] = html_print_label_input_block(
__('Secondary groups'),
html_print_select_agent_secondary(
$agent,
- $id_agente
+ $id_agente,
+ ['selected_post' => $secondary_groups]
)
);
diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php
index dc27e4b207..f5a9278a68 100644
--- a/pandora_console/godmode/agentes/configurar_agente.php
+++ b/pandora_console/godmode/agentes/configurar_agente.php
@@ -228,7 +228,7 @@ if ($create_agent) {
$cps = (int) get_parameter_switch('cps', -1);
$fixed_ip = (int) get_parameter_switch('fixed_ip', 0);
- $secondary_groups = (string) get_parameter('secondary_hidden', '');
+ $secondary_groups = (array) get_parameter('secondary_groups_selected', '');
$fields = db_get_all_fields_in_table('tagent_custom_fields');
if ($fields === false) {
@@ -343,7 +343,7 @@ if ($create_agent) {
'agents_update_secondary_groups',
[
$id_agente,
- explode(',', $secondary_groups),
+ $secondary_groups,
[],
]
);
@@ -992,7 +992,7 @@ if ($update_agent) {
$cps = get_parameter_switch('cps', -1);
$old_values = db_get_row('tagente', 'id_agente', $id_agente);
$fields = db_get_all_fields_in_table('tagent_custom_fields');
- $secondary_groups = (string) get_parameter('secondary_hidden', '');
+ $secondary_groups = (array) get_parameter('secondary_groups_selected', '');
$satellite_server = (int) get_parameter('satellite_server', 0);
$fixed_ip = (int) get_parameter_switch('fixed_ip', 0);
@@ -1185,13 +1185,27 @@ if ($update_agent) {
"Quiet":"'.(int) $quiet.'",
"Cps":"'.(int) $cps.'"}';
+
+ $secondary_groups_selected = enterprise_hook(
+ 'agents_get_secondary_groups',
+ [$id_agente]
+ );
+
+ $delete_secondary_groups = [];
+ foreach ($secondary_groups_selected['plain'] as $v_selected) {
+ if (in_array($v_selected, $secondary_groups) === false) {
+ array_push($delete_secondary_groups, $v_selected);
+ }
+ }
+
// Create the secondary groups.
enterprise_hook(
'agents_update_secondary_groups',
[
$id_agente,
- explode(',', $secondary_groups),
- [],
+ $secondary_groups,
+ $delete_secondary_groups,
+ true,
]
);
diff --git a/pandora_console/godmode/groups/group_list.php b/pandora_console/godmode/groups/group_list.php
index 4647231927..2747b2be2e 100644
--- a/pandora_console/godmode/groups/group_list.php
+++ b/pandora_console/godmode/groups/group_list.php
@@ -65,7 +65,7 @@ if (is_ajax() === true) {
$group = [
'id_grupo' => 0,
'nombre' => 'None',
- 'icon' => 'world',
+ 'icon' => 'world@svg.svg',
'parent' => 0,
'disabled' => 0,
'custom_id' => null,
diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php
index 65e93478e3..ff9857fbd3 100755
--- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php
+++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php
@@ -117,6 +117,7 @@ $period = SECONDS_1DAY;
$search = '';
$full_text = 0;
$log_number = 1000;
+$inventory_regular_expression = '';
// Added support for projection graphs.
$period_pg = SECONDS_5DAY;
$projection_period = SECONDS_5DAY;
@@ -940,6 +941,7 @@ switch ($action) {
$inventory_modules = $es['inventory_modules'];
$id_agents = $es['id_agents'];
$recursion = $item['recursion'];
+ $inventory_regular_expression = $es['inventory_regular_expression'];
$idAgent = $es['id_agents'];
$idAgentModule = $inventory_modules;
@@ -2196,6 +2198,15 @@ $class = 'databox filters';
+
+ |
+
+
+ |
+
+
|
@@ -4271,7 +4282,7 @@ function print_SLA_list($width, $action, $idItem=null)
echo ' | ';
echo '';
echo '';
- echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter']);
+ echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter main_menu_icon']);
echo '';
echo ' | ';
echo '
';
@@ -4314,7 +4325,7 @@ function print_SLA_list($width, $action, $idItem=null)
html_print_image(
'images/delete.svg',
false,
- ['class' => 'invert_filter']
+ ['class' => 'invert_filter main_menu_icon']
);
?>
@@ -4738,7 +4749,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
'.printSmallFont($nameAgentFailover).$server_name_element.' |
'.printSmallFont($nameModuleFailover).' |
- '.html_print_image('images/delete.svg', true, ['class' => 'invert_filter']).'
+ '.html_print_image('images/delete.svg', true, ['class' => 'invert_filter main_menu_icon']).'
|
';
} else {
@@ -4746,7 +4757,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
'.printSmallFont($nameAgent).$server_name_element.' |
'.printSmallFont($nameModule).' |
- '.html_print_image('images/delete.svg', true, ['class' => 'invert_filter']).'
+ '.html_print_image('images/delete.svg', true, ['class' => 'invert_filter main_menu_icon']).'
|
';
}
@@ -4756,7 +4767,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
'.printSmallFont($nameModule).' |
'.printSmallFont($operation[$item['operation']]).' |
- '.html_print_image('images/delete.svg', true, ['class' => 'invert_filter']).'
+ '.html_print_image('images/delete.svg', true, ['class' => 'invert_filter main_menu_icon']).'
|
';
}
@@ -4796,7 +4807,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
html_print_image(
'images/delete.svg',
false,
- ['class' => 'invert_filter']
+ ['class' => 'invert_filter main_menu_icon']
);
?>
@@ -6445,6 +6456,7 @@ function chooseType() {
$("#row_date").hide();
$("#row_agent_multi").hide();
$("#row_module_multi").hide();
+ $('#row_regular_expression').hide();
$("#row_event_graphs").hide();
$("#row_event_graph_by_agent").hide();
$("#row_event_graph_by_user").hide();
@@ -7154,6 +7166,7 @@ function chooseType() {
$("#row_group").show();
$("#row_agent_multi").show();
$("#row_module_multi").show();
+ $('#row_regular_expression').show();
$("#row_date").show();
$("#id_agents")
diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php
index 6fc2056587..cd049f1d83 100755
--- a/pandora_console/godmode/reporting/reporting_builder.php
+++ b/pandora_console/godmode/reporting/reporting_builder.php
@@ -1756,6 +1756,7 @@ switch ($action) {
$es['inventory_modules'] = get_parameter(
'inventory_modules'
);
+ $es['inventory_regular_expression'] = get_parameter('inventory_regular_expression', '');
$description = get_parameter('description');
$values['external_source'] = json_encode($es);
$good_format = true;
@@ -2538,6 +2539,7 @@ switch ($action) {
$es['inventory_modules'] = get_parameter(
'inventory_modules'
);
+ $es['inventory_regular_expression'] = get_parameter('inventory_regular_expression', '');
$values['external_source'] = json_encode($es);
$good_format = true;
break;
diff --git a/pandora_console/godmode/setup/setup_general.php b/pandora_console/godmode/setup/setup_general.php
index ad7a40aa8b..82b6392a56 100644
--- a/pandora_console/godmode/setup/setup_general.php
+++ b/pandora_console/godmode/setup/setup_general.php
@@ -431,7 +431,7 @@ $table->data[$i++][] = html_print_label_input_block(
$table->colspan[$i][] = 2;
$table->data[$i++][] = html_print_label_input_block(
- __('Timezone setup'),
+ __('Server timezone setup'),
html_print_div(
[
'class' => '',
diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php
index 869a504c8f..2f01df4a55 100644
--- a/pandora_console/godmode/users/configure_user.php
+++ b/pandora_console/godmode/users/configure_user.php
@@ -344,7 +344,7 @@ if ($new_user === true && (bool) $config['admin_can_add_user'] === true) {
$user_info['metaconsole_access_node'] = 0;
}
- if ((bool) $config['ehorus_user_level_conf'] === true) {
+ if (isset($config['ehorus_user_level_conf']) === true && (bool) $config['ehorus_user_level_conf'] === true) {
$user_info['ehorus_user_level_user'] = '';
$user_info['ehorus_user_level_pass'] = '';
$user_info['ehorus_user_level_enabled'] = true;
@@ -1247,7 +1247,7 @@ $allowedIP .= ui_print_help_tip(__('Add the source IPs that will allow console a
$allowedIP .= html_print_checkbox_switch(
'allowed_ip_active',
0,
- $user_info['allowed_ip_active'],
+ ($user_info['allowed_ip_active'] ?? 0),
true
);
$allowedIP .= '
';
@@ -1255,7 +1255,7 @@ $allowedIP .= html_print_textarea(
'allowed_ip_list',
2,
65,
- $user_info['allowed_ip_list'],
+ ($user_info['allowed_ip_list'] ?? 0),
(((bool) $view_mode === true) ? 'readonly="readonly"' : ''),
true
);
@@ -1323,20 +1323,6 @@ $home_screen = ''.__('Home
true
).'
';
-/*
- $home_screen .= html_print_select(
- $values,
- 'section',
- io_safe_output($user_info['section']),
- 'show_data_section();',
- '',
- -1,
- true,
- false,
- false
- ).'
';
-*/
-
$dashboards = Manager::getDashboards(
-1,
-1,
@@ -1358,7 +1344,6 @@ $home_screen .= '';
$home_screen .= html_print_select($dashboards_aux, 'dashboard', $user_info['data_section'], '', '', '', true);
$home_screen .= '
';
-
$layouts = visual_map_get_user_layouts($config['id_user'], true);
$layouts_aux = [];
if ($layouts === false) {
@@ -1459,7 +1444,7 @@ $default_event_filter = ''
$default_event_filter .= html_print_select(
$event_filter,
'default_event_filter',
- $user_info['default_event_filter'],
+ ($user_info['default_event_filter'] ?? 0),
'',
'',
__('None'),
@@ -1661,14 +1646,12 @@ if ((bool) $config['admin_can_add_user'] === true) {
}
echo '
';
-if ($new_user === true) {
- html_print_input_hidden('json_profile', $json_profile);
-}
+html_print_input_hidden('json_profile', $json_profile);
echo '';
// User Profile definition table. (Only where user is not creating).
-if ($new_user === false && ((bool) check_acl($config['id_user'], 0, 'UM') === true)) {
+if ((bool) check_acl($config['id_user'], 0, 'UM') === true) {
profile_print_profile_table($id, io_safe_output($json_profile), false, ($is_err === true));
}
@@ -1720,7 +1703,7 @@ $delete_image = html_print_input_image(
true,
[
'onclick' => 'delete_profile(event, this)',
- 'class' => 'invert_filter',
+ 'class' => 'invert_filter main_menu_icon',
]
);
@@ -1891,7 +1874,7 @@ if (is_metaconsole() === false) {
profile_text = `${profile_text}`;
group_img = ``;
- group_text = `${group_img}${group_text}`;
+ group_text = `${group_img} ${group_text}`;
$('#table_profiles tr:last').before(
`
@@ -2258,4 +2241,4 @@ if (is_metaconsole() === false) {
/* ]]> */
-
\ No newline at end of file
+
diff --git a/pandora_console/godmode/users/user_management.php b/pandora_console/godmode/users/user_management.php
index eaf9032e76..45c54306ce 100644
--- a/pandora_console/godmode/users/user_management.php
+++ b/pandora_console/godmode/users/user_management.php
@@ -374,7 +374,13 @@ if (users_is_admin() === true) {
);
}
-$userManagementTable->data['show_tips_startup'][0] = html_print_checkbox_switch('show_tips_startup', 1, ($user_info['show_tips_startup'] === null) ? true : $user_info['show_tips_startup'], true);
+$userManagementTable->data['show_tips_startup'][0] = html_print_checkbox_switch(
+ 'show_tips_startup',
+ 1,
+ (isset($user_info['show_tips_startup']) === false) ? true : $user_info['show_tips_startup'],
+ true
+);
+
$userManagementTable->data['show_tips_startup'][1] = ''.__('Show usage tips at startup').'';
// Session time input.
@@ -537,7 +543,7 @@ $userManagementTable->data['captions_autorefreshTime'][0] = __('Time for autoref
$userManagementTable->data['fields_autorefreshTime'][0] = html_print_select(
get_refresh_time_array(),
'time_autorefresh',
- $user_info['time_autorefresh'],
+ ($user_info['time_autorefresh'] ?? 0),
'',
'',
'',
@@ -594,7 +600,7 @@ $userManagementTable->data['captions_blocksize_eventfilter'][1] = __('Event filt
$userManagementTable->data['fields_blocksize_eventfilter'][1] = html_print_select(
$event_filter,
'default_event_filter',
- $user_info['default_event_filter'],
+ ($user_info['default_event_filter'] ?? 0),
'',
'',
__('None'),
@@ -700,7 +706,7 @@ $userManagementTable->data['fields_addSettings'][1] = html_print_div(
'allowed_ip_list',
5,
65,
- $user_info['allowed_ip_list'],
+ ($user_info['allowed_ip_list'] ?? ''),
(((bool) $view_mode === true) ? 'readonly="readonly"' : ''),
true
),
@@ -720,7 +726,7 @@ $allowAllIpsContent[] = html_print_div(
'content' => html_print_checkbox_switch(
'allowed_ip_active',
0,
- $user_info['allowed_ip_active'],
+ ($user_info['allowed_ip_active'] ?? 0),
true
),
],
@@ -736,13 +742,15 @@ $userManagementTable->data['fields_addSettings'][1] .= html_print_div(
true
);
-// QR Code and API Token advice.
-html_print_div(
- [
- 'id' => 'api_qrcode_display',
- 'content' => $CodeQRTable.$apiTokenContent,
- ]
-);
+if (isset($CodeQRTable) === true || isset($apiTokenContent) === true) {
+ // QR Code and API Token advice.
+ html_print_div(
+ [
+ 'id' => 'api_qrcode_display',
+ 'content' => $CodeQRTable.$apiTokenContent,
+ ]
+ );
+}
html_print_table($userManagementTable);
diff --git a/pandora_console/include/ajax/heatmap.ajax.php b/pandora_console/include/ajax/heatmap.ajax.php
index 37806fb4a4..8ce0691a3d 100644
--- a/pandora_console/include/ajax/heatmap.ajax.php
+++ b/pandora_console/include/ajax/heatmap.ajax.php
@@ -137,6 +137,7 @@ if (is_ajax() === true) {
switch ($type) {
case 0:
+ case 3:
default:
$label = __('Group');
$input = html_print_input(
@@ -234,10 +235,6 @@ if (is_ajax() === true) {
'5'
);
break;
-
- case 3:
- // Empty.
- break;
}
echo html_print_label_input_block(
@@ -246,6 +243,7 @@ if (is_ajax() === true) {
[
'label_class' => 'font-title-font',
'div_class' => 'mrgn_top_10px',
+ 'div_id' => 'filter_type',
]
);
}
@@ -259,10 +257,19 @@ if (is_ajax() === true) {
$nd->connect();
}
+ echo '';
+
switch ($type) {
case 3:
case 2:
- $data = db_get_row('tagente_modulo', 'id_agente_modulo', $id);
+ $sql = sprintf(
+ 'SELECT * FROM tagente_modulo ag
+ INNER JOIN tagente_estado ae ON ag.id_agente_modulo = ae.id_agente_modulo
+ WHERE ag.id_agente_modulo = %d',
+ $id
+ );
+
+ $data = db_get_row_sql($sql);
// Nombre.
$link = sprintf(
@@ -298,6 +305,92 @@ if (is_ajax() === true) {
echo '
'.__('Module group').'
';
echo '
'.$group.'
';
echo '
';
+
+ $graph_type = return_graphtype($data['module_type']);
+
+ $url = ui_get_full_url('operation/agentes/stat_win.php', false, false, false);
+ $handle = dechex(crc32($data['id_agente_modulo'].$data['module_name']));
+ $win_handle = 'day_'.$handle;
+
+ $graph_params = [
+ 'type' => $graph_type,
+ 'period' => SECONDS_1DAY,
+ 'id' => $data['id_agente_modulo'],
+ 'refresh' => SECONDS_10MINUTES,
+ ];
+
+
+ $graph_params_str = http_build_query($graph_params);
+
+ $link = 'winopeng_var(\''.$url.'?'.$graph_params_str.'\',\''.$win_handle.'\', 800, 480)';
+ $img_graph = html_print_anchor(
+ [
+ 'href' => 'javascript:'.$link,
+ 'content' => html_print_image('images/module-graph.svg', true, ['border' => '0', 'alt' => '', 'class' => 'invert_filter main_menu_icon']),
+ ],
+ true
+ );
+
+
+ echo '';
+ echo '
'.__('Data').'
';
+ $data_module = '';
+ if (is_numeric($data['datos'])) {
+ $data_module = remove_right_zeros(
+ number_format(
+ $data['datos'],
+ $config['graph_precision'],
+ $config['decimal_separator'],
+ $config['thousand_separator']
+ )
+ );
+ echo '
'.$data_module.' '.$data['unit'].' '.$img_graph.'
';
+ } else {
+ $data_module = $data['datos'];
+ echo '
'.$data['datos'].' '.$data['unit'].' '.$img_graph.'
';
+ }
+
+ echo '
';
+
+ echo '';
+ echo '
'.__('Date of last data').'
';
+ echo '
'.date('Y-m-d H:i:s', $data['utimestamp']).'
';
+ echo '
';
+
+ $status = modules_get_agentmodule_status($id);
+ switch ($status) {
+ case AGENT_MODULE_STATUS_NORMAL:
+ $status = ui_print_status_image('module_ok.png', $data_module, true);
+ break;
+
+ case AGENT_MODULE_STATUS_CRITICAL_BAD:
+ $status = ui_print_status_image('module_critical.png', $data_module, false);
+ break;
+
+ case AGENT_MODULE_STATUS_WARNING:
+ $status = ui_print_status_image('module_warning.png', $data_module, false);
+ break;
+
+ case AGENT_MODULE_STATUS_NORMAL_ALERT:
+ case AGENT_MODULE_STATUS_WARNING_ALERT:
+ case AGENT_MODULE_STATUS_CRITICAL_ALERT:
+ $status = ui_print_status_image('module_alertsfired.png', $data_module, false);
+ break;
+
+ case 4:
+ $status = ui_print_status_image('module_no_data.png', $data_module, false);
+ break;
+
+ default:
+ case AGENT_MODULE_STATUS_UNKNOWN:
+ $status = ui_print_status_image('module_unknown.png', $data_module, false);
+ break;
+ }
+
+ echo '';
+ echo '
'.__('Status').'
';
+ echo '
'.$status.'
';
+ echo '
';
break;
case 1:
@@ -381,6 +474,43 @@ if (is_ajax() === true) {
echo ''.$data['comentarios'].'
';
echo '';
+ // Last contact.
+ $lastContactDate = ui_print_timestamp($data['ultimo_contacto'], true);
+ $remoteContactDate = ($data['ultimo_contacto_remoto'] === '01-01-1970 00:00:00') ? __('Never') : date_w_fixed_tz($data['ultimo_contacto_remoto']);
+ $lastAndRemoteContact = sprintf('%s / %s', $lastContactDate, $remoteContactDate);
+
+ echo '';
+ echo '
'.__('Last contact').' / '.__('Remote').'
';
+ echo '
'.$lastAndRemoteContact.'
';
+ echo '
';
+
+
+ // Next contact progress.
+ $progress = agents_get_next_contact($id);
+ $tempTimeToShow = ($data['intervalo'] - (strtotime('now') - strtotime($data['ultimo_contacto'])));
+ $progressCaption = ($tempTimeToShow >= 0) ? sprintf('%d s', $tempTimeToShow) : __('Out of bounds');
+ $ajaxNextContactInterval = (empty($data['intervalo']) === true) ? 0 : (100 / $data['intervalo']);
+ echo '';
+ echo '
'.__('Next contact').'
';
+ echo '
'.ui_progress(
+ $progress,
+ '80%',
+ '1.2',
+ '#ececec',
+ true,
+ $progressCaption,
+ [
+ 'page' => 'operation/agentes/ver_agente',
+ 'interval' => $ajaxNextContactInterval,
+ 'data' => [
+ 'id_agente' => $id,
+ 'refresh_contact' => 1,
+ ],
+
+ ]
+ ).'
';
+ echo '
';
+
// Group.
$secondary_groups = '';
$secondary = enterprise_hook('agents_get_secondary_groups', [$data['id_agente']]);
@@ -394,6 +524,27 @@ if (is_ajax() === true) {
echo ''.groups_get_name($data['id_grupo']).$secondary_groups.'
';
echo '';
+ echo '';
+ echo graph_agent_status(
+ $id,
+ 150,
+ 150,
+ true,
+ false,
+ false,
+ true
+ );
+ echo '
';
+ echo '';
+ echo reporting_tiny_stats(
+ $data,
+ true,
+ 'agent',
+ // Useless.
+ ':',
+ true
+ );
+ echo '
';
// Events.
$result_graph_event = enterprise_hook(
@@ -419,6 +570,8 @@ if (is_ajax() === true) {
break;
}
+ echo '';
+
if (empty($id_server) === false) {
$nd->disconnect();
}
diff --git a/pandora_console/include/class/Heatmap.class.php b/pandora_console/include/class/Heatmap.class.php
index de3ef90ba3..94b8fef429 100644
--- a/pandora_console/include/class/Heatmap.class.php
+++ b/pandora_console/include/class/Heatmap.class.php
@@ -282,7 +282,6 @@ class Heatmap
while (cont <= limit) {
if (typeof lista[cont] !== 'undefined') {
const rect = document.getElementsByName(`${lista[cont]['id']}`);
- console.log(rect[0]);
$(`#${rect[0].id}`).removeClass();
$(`#${rect[0].id}`).addClass(`${lista[cont]['status']} hover`);
}
@@ -938,10 +937,27 @@ class Heatmap
if (users_is_admin() === false) {
$user_groups = array_keys(users_get_groups($config['user'], 'AR', false));
if (empty($user_groups) === false) {
+ if (empty($this->filter) === false && empty(current($this->filter)) === false) {
+ $user_groups = array_intersect($this->filter, $user_groups);
+ $id_user_groups = sprintf(
+ 'INNER JOIN tagente a ON a.id_agente = ae.id_agente
+ AND a.id_grupo IN (%s)',
+ implode(',', $user_groups)
+ );
+ } else {
+ $id_user_groups = sprintf(
+ 'INNER JOIN tagente a ON a.id_agente = ae.id_agente
+ AND a.id_grupo IN (%s)',
+ implode(',', $user_groups)
+ );
+ }
+ }
+ } else {
+ if (empty($this->filter) === false && empty(current($this->filter)) === false) {
$id_user_groups = sprintf(
'INNER JOIN tagente a ON a.id_agente = ae.id_agente
AND a.id_grupo IN (%s)',
- implode(',', $user_groups)
+ implode(',', $this->filter)
);
}
}
@@ -1292,13 +1308,31 @@ class Heatmap
const id = name.split('|')[0];
const server = name.split('|')[1];
+ let height = 400;
+ let width = 530;
+ switch (type) {
+ case 0:
+ height = 670;
+ width = 460;
+ break;
+
+ case 2:
+ case 3:
+ height = 450;
+ width = 460;
+ break;
+
+ default:
+ break;
+ }
+
$("#info_dialog").dialog({
resizable: true,
draggable: true,
modal: true,
closeOnEscape: true,
- height: 400,
- width: 530,
+ height: height,
+ width: width,
title: '',
open: function() {
$.ajax({
@@ -1325,13 +1359,23 @@ class Heatmap
if (count($groups) > 1 && $this->group === 1 && $this->dashboard === false) {
$x_back = 0;
$y_back = 0;
+ $x_text_correction = 0.25;
- if ($count_result <= 100) {
+ if ($count_result <= 10) {
$fontSize = 'small-size';
$stroke = 'small-stroke';
- } else {
+ } else if ($count_result > 10 && $count_result <= 100) {
+ $fontSize = 'tiny-size';
+ $stroke = 'tiny-stroke';
+ } else if ($count_result > 100 && $count_result <= 1000) {
+ $fontSize = 'medium-size';
+ $stroke = 'medium-stroke';
+ } else if ($count_result > 1000 && $count_result <= 10000) {
$fontSize = 'big-size';
$stroke = 'big-stroke';
+ } else {
+ $fontSize = 'huge-size';
+ $stroke = 'huge-stroke';
}
echo '';
@@ -1385,7 +1429,7 @@ class Heatmap
echo '';
// Name.
- echo ''.$name.'';
$x_back = $x_position;
@@ -1436,7 +1480,7 @@ class Heatmap
echo '';
// Name.
- echo ''.$name.'';
// Bottom-right of last line.
@@ -1493,7 +1537,7 @@ class Heatmap
echo '';
// Name.
- echo ''.$name.'';
// Bottom-top of last line.
diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php
index c5af28b54f..b6aca966a7 100644
--- a/pandora_console/include/class/Tree.class.php
+++ b/pandora_console/include/class/Tree.class.php
@@ -133,6 +133,11 @@ class Tree
protected function getEmptyModuleFilterStatus()
{
+ if ($this->filter['statusModule'] === 'fired') {
+ $this->filter['statusModuleOriginal'] = $this->filter['statusModule'];
+ $this->filter['statusModule'] = -1;
+ }
+
return (
!isset($this->filter['statusModule']) ||
$this->filter['statusModule'] == -1
@@ -219,6 +224,10 @@ class Tree
$agent_status_filter = ' AND (ta.critical_count > 0
OR ta.warning_count > 0) ';
break;
+
+ case AGENT_STATUS_ALERT_FIRED:
+ $agent_status_filter = ' AND ta.fired_count > 0 ';
+ break;
}
return $agent_status_filter;
@@ -284,6 +293,11 @@ class Tree
protected function getModuleStatusFilter()
{
+ if ($this->filter['statusModule'] === 'fired') {
+ $this->filter['statusModuleOriginal'] = $this->filter['statusModule'];
+ $this->filter['statusModule'] = -1;
+ }
+
$show_init_condition = ($this->filter['show_not_init_agents']) ? '' : ' AND ta.notinit_count <> ta.total_count';
if ($this->getEmptyModuleFilterStatus()) {
@@ -294,6 +308,10 @@ class Tree
return ' AND (ta.warning_count > 0 OR ta.critical_count > 0)';
}
+ if ($this->filter['statusModule'] === 'fired') {
+ return ' AND ta.fired_count > 0';
+ }
+
$field_filter = modules_get_counter_by_states($this->filter['statusModule']);
if ($field_filter === false) {
return ' AND 1=0';
@@ -333,6 +351,11 @@ class Tree
protected function getModuleStatusFilterFromTestado($state=false, $without_ands=false)
{
+ if ($this->filter['statusModule'] === 'fired') {
+ $this->filter['statusModuleOriginal'] = $this->filter['statusModule'];
+ $this->filter['statusModule'] = -1;
+ }
+
$selected_status = ($state !== false && $state !== self::TV_DEFAULT_AGENT_STATUS) ? $state : $this->filter['statusModule'];
$filter = [modules_get_state_condition($selected_status)];
@@ -811,6 +834,11 @@ class Tree
protected function processAgent(&$agent, $server=false)
{
+ if ($this->filter['statusModule'] === 'fired') {
+ $this->filter['statusModuleOriginal'] = $this->filter['statusModule'];
+ $this->filter['statusModule'] = -1;
+ }
+
global $config;
$agent['type'] = 'agent';
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 0ba6d03a70..38689965f0 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
-$build_version = 'PC230412';
+$build_version = 'PC230417';
$pandora_version = 'v7.0NG.770';
// Do not overwrite default timezone set if defined.
diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php
index 9616634adb..b4f5a7bcbe 100644
--- a/pandora_console/include/functions_events.php
+++ b/pandora_console/include/functions_events.php
@@ -5272,7 +5272,7 @@ function events_page_comments($event, $ajax=false, $groupedComments=[])
'%s %s %s%s',
$c['action'],
__('by'),
- get_user_fullname($c['id_user']).' ('.$c['id_user'].')',
+ get_user_fullname(io_safe_input($c['id_user'])).' ('.io_safe_input($c['id_user']).')',
$eventIdExplanation
);
diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php
index 37054a3e86..7af040fcc1 100644
--- a/pandora_console/include/functions_html.php
+++ b/pandora_console/include/functions_html.php
@@ -6435,7 +6435,11 @@ function html_print_select_agent_secondary($agent, $id_agente, $options=[])
[$id_agente]
);
- $name = 'secondary_groups_selected'.$options['extra_id'];
+ if ($options['selected_post'] !== null) {
+ $secondary_groups_selected['plain'] = $options['selected_post'];
+ }
+
+ $name = 'secondary_groups_selected[]'.$options['extra_id'];
if ($options['only_select'] === true) {
$name = 'secondary_groups'.$options['extra_id'].'[]';
}
@@ -6455,7 +6459,7 @@ function html_print_select_agent_secondary($agent, $id_agente, $options=[])
$name,
// Selected.
// No select any by default.
- $secondary_groups_selected['for_select'],
+ $secondary_groups_selected['plain'],
// Script.
// Javascript onChange code.
'',
diff --git a/pandora_console/include/functions_inventory.php b/pandora_console/include/functions_inventory.php
index dc0c23a31c..5b3efedc93 100644
--- a/pandora_console/include/functions_inventory.php
+++ b/pandora_console/include/functions_inventory.php
@@ -36,7 +36,8 @@ function inventory_get_data(
$return_mode=false,
$order_by_agent=false,
$node='',
- $pagination_url_parameters=[]
+ $pagination_url_parameters=[],
+ $regular_expression=''
) {
global $config;
@@ -268,7 +269,15 @@ function inventory_get_data(
$i++;
}
- $data[] = $temp_row;
+ if ($regular_expression !== '') {
+ if (is_array(preg_grep('/'.$regular_expression.'/', $temp_row))) {
+ if (count(preg_grep('/'.$regular_expression.'/', $temp_row)) > 0) {
+ $data[] = $temp_row;
+ }
+ }
+ } else {
+ $data[] = $temp_row;
+ }
}
}
diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php
index 9c99d47a2a..deb37fda73 100755
--- a/pandora_console/include/functions_reporting.php
+++ b/pandora_console/include/functions_reporting.php
@@ -3170,6 +3170,7 @@ function reporting_inventory($report, $content, $type)
$date = $es['date'];
$description = $content['description'];
+ $inventory_regular_expression = $es['inventory_regular_expression'];
switch ($type) {
case 'data':
@@ -3179,7 +3180,11 @@ function reporting_inventory($report, $content, $type)
$date,
'',
false,
- 'csv'
+ 'csv',
+ false,
+ '',
+ [],
+ $inventory_regular_expression
);
break;
@@ -3190,7 +3195,11 @@ function reporting_inventory($report, $content, $type)
$date,
'',
false,
- 'hash'
+ 'hash',
+ false,
+ '',
+ [],
+ $inventory_regular_expression
);
break;
}
diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php
index e1e68b94f0..f37df709c4 100644
--- a/pandora_console/include/functions_reporting_html.php
+++ b/pandora_console/include/functions_reporting_html.php
@@ -1996,6 +1996,13 @@ function reporting_html_inventory($table, $item, $pdf=0)
&& is_array($type_modules) === true
) {
foreach ($type_modules as $key_type_module => $type_module) {
+ $print_table = true;
+ foreach ($type_module as $key => $module) {
+ if (count($module['data']) == 0) {
+ unset($type_module[$key]);
+ }
+ }
+
$table1 = new stdClass();
$table1->width = '99%';
$table1->class = 'info_table';
@@ -2006,57 +2013,62 @@ function reporting_html_inventory($table, $item, $pdf=0)
if (isset($type_module) === true
&& is_array($type_module) === true
) {
- foreach ($type_module as $key_type => $module) {
- if (isset($module['data']) === true
- && is_array($module['data']) === true
- ) {
- array_pop($module['data']);
- foreach ($module['data'] as $k_module => $v_module) {
- $str_key = $key_type_module.'-'.$key_type.'-'.$k_module;
- $table1->head[0] = __('Agent');
- $table1->head[1] = __('Module');
- $table1->head[2] = __('Date');
- $table1->headstyle[0] = 'text-align: left';
- $table1->headstyle[1] = 'text-align: left';
- $table1->headstyle[2] = 'text-align: left';
- $table1->cellstyle[$str_key][0] = 'text-align: left;';
- $table1->cellstyle[$str_key][1] = 'text-align: left;';
- $table1->cellstyle[$str_key][2] = 'text-align: left;';
- $table1->data[$str_key][0] = $module['agent_name'];
- $table1->data[$str_key][1] = $key_type_module;
- $dateModule = explode(' ', $module['timestamp']);
- $table1->data[$str_key][2] = $dateModule[0];
- if (isset($v_module) === true
- && is_array($v_module) === true
- ) {
- foreach ($v_module as $k => $v) {
- $table1->head[$k] = $k;
- $table1->headstyle[$k] = 'text-align: left';
- $table1->cellstyle[$str_key][$k] = 'text-align: left;';
- if ($pdf === 0) {
- $table1->data[$str_key][$k] = $v;
- } else {
- // Workaround to prevent table columns from growing indefinitely in PDFs.
- $table1->data[$str_key][$k] = preg_replace(
- '/([^\s]{30})(?=[^\s])/',
- '$1'.'
',
- $v
- );
+ if (count($type_module) > 0) {
+ foreach ($type_module as $key_type => $module) {
+ if (isset($module['data']) === true
+ && is_array($module['data']) === true
+ ) {
+ foreach ($module['data'] as $k_module => $v_module) {
+ $str_key = $key_type_module.'-'.$key_type.'-'.$k_module;
+ $table1->head[0] = __('Agent');
+ $table1->head[1] = __('Module');
+ $table1->head[2] = __('Date');
+ $table1->headstyle[0] = 'text-align: left';
+ $table1->headstyle[1] = 'text-align: left';
+ $table1->headstyle[2] = 'text-align: left';
+ $table1->cellstyle[$str_key][0] = 'text-align: left;';
+ $table1->cellstyle[$str_key][1] = 'text-align: left;';
+ $table1->cellstyle[$str_key][2] = 'text-align: left;';
+ $table1->data[$str_key][0] = $module['agent_name'];
+ $table1->data[$str_key][1] = $key_type_module;
+ $dateModule = explode(' ', $module['timestamp']);
+ $table1->data[$str_key][2] = $dateModule[0];
+ if (isset($v_module) === true
+ && is_array($v_module) === true
+ ) {
+ foreach ($v_module as $k => $v) {
+ $table1->head[$k] = $k;
+ $table1->headstyle[$k] = 'text-align: left';
+ $table1->cellstyle[$str_key][$k] = 'text-align: left;';
+ if ($pdf === 0) {
+ $table1->data[$str_key][$k] = $v;
+ } else {
+ // Workaround to prevent table columns from growing indefinitely in PDFs.
+ $table1->data[$str_key][$k] = preg_replace(
+ '/([^\s]{30})(?=[^\s])/',
+ '$1'.'
',
+ $v
+ );
+ }
}
}
}
}
}
+ } else {
+ $print_table = false;
}
+ } else {
+ $print_table = false;
}
- if ($pdf === 0) {
+ if ($pdf === 0 && $print_table === true) {
$table->colspan[$key_type_module]['cell'] = 3;
$table->data[$key_type_module]['cell'] = html_print_table(
$table1,
true
);
- } else {
+ } else if ($print_table === true) {
$return_pdf .= html_print_table(
$table1,
true
@@ -5988,7 +6000,7 @@ function reporting_get_events($data, $links=false)
$tooltip = ui_print_help_tip(
__(
- "Event count corresponds to events within the last hour"
+ 'Event count corresponds to events within the last hour'
),
true
);
diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php
index 536a749206..e9b5666f7c 100755
--- a/pandora_console/include/functions_ui.php
+++ b/pandora_console/include/functions_ui.php
@@ -712,7 +712,14 @@ function ui_print_group_icon($id_group, $return=false, $path='', $style='', $lin
$output = '';
- $icon = ($id_group > 0) ? (string) db_get_value('icon', 'tgrupo', 'id_grupo', (int) $id_group) : 'unknown@groups.svg';
+ $icon = 'world@svg.svg';
+ if ($id_group > 0) {
+ $icon = db_get_value('icon', 'tgrupo', 'id_grupo', (int) $id_group);
+ if (empty($icon) === true) {
+ $icon = 'unknown@groups.svg';
+ }
+ }
+
$extension = pathinfo($icon, PATHINFO_EXTENSION);
if (empty($extension) === true) {
$icon .= '.png';
diff --git a/pandora_console/include/javascript/pandora_dashboards.js b/pandora_console/include/javascript/pandora_dashboards.js
index f46c64082f..a22c94b2ab 100644
--- a/pandora_console/include/javascript/pandora_dashboards.js
+++ b/pandora_console/include/javascript/pandora_dashboards.js
@@ -1571,16 +1571,12 @@ function type_change() {
var type = document.getElementById("type").value;
switch (type) {
- case "3":
- $("#li_tags").hide();
- $("#li_groups").hide();
- $("#li_module_groups").hide();
- break;
case "2":
$("#li_tags").hide();
$("#li_groups").hide();
$("#li_module_groups").show();
break;
+
case "1":
$("#li_tags").show();
$("#li_groups").hide();
@@ -1588,6 +1584,7 @@ function type_change() {
break;
default:
+ case "3":
case "0":
$("#li_tags").hide();
$("#li_groups").show();
diff --git a/pandora_console/include/javascript/tree/TreeController.js b/pandora_console/include/javascript/tree/TreeController.js
index 59a4f43d50..a32a749c5e 100644
--- a/pandora_console/include/javascript/tree/TreeController.js
+++ b/pandora_console/include/javascript/tree/TreeController.js
@@ -1381,7 +1381,6 @@ var TreeController = {
.removeClass("leaf-closed")
.removeClass("leaf-error")
.addClass("leaf-loading");
-
$.ajax({
url: controller.ajaxURL,
type: "POST",
@@ -1413,6 +1412,53 @@ var TreeController = {
data.tree.length > 0) ||
$group.length > 0
) {
+ if (controller.filter.statusModule === "fired") {
+ var newData = { success: data.success, tree: [] };
+
+ data.tree.forEach(element => {
+ // Agents.
+ if (
+ typeof element.counters !== "undefined" &&
+ element.counters.alerts > 0
+ ) {
+ var treeTmp = element;
+
+ treeTmp.counters.critical = 0;
+ treeTmp.counters.not_init = 0;
+ treeTmp.counters.ok = 0;
+ treeTmp.counters.unknown = 0;
+ treeTmp.counters.warning = 0;
+ treeTmp.counters.total =
+ element.counters.alerts;
+
+ treeTmp.critical_count = 0;
+ treeTmp.normal_count = 0;
+ treeTmp.notinit_count = 0;
+ treeTmp.unknown_count = 0;
+ treeTmp.warning_count = 0;
+ treeTmp.total_count = element.fired_count;
+
+ treeTmp.state_critical = 0;
+ treeTmp.state_normal = 0;
+ treeTmp.state_notinit = 0;
+ treeTmp.state_unknown = 0;
+ treeTmp.state_warning = 0;
+ treeTmp.state_total = element.fired_count;
+
+ newData.tree.push(treeTmp);
+ data = newData;
+ }
+
+ // Modules.
+ if (element.alerts > 0) {
+ var treeTmp = element;
+
+ newData.tree.push(treeTmp);
+ data = newData;
+ }
+ });
+ }
+
$node.addClass("leaf-open");
if ($group.length <= 0) {
@@ -1513,6 +1559,34 @@ var TreeController = {
this.reload();
},
init: function(data) {
+ if (data.filter.statusModule === "fired") {
+ const newData = {
+ ajaxUrl: data.ajaxURL,
+ baseURL: data.baseURL,
+ counterTitle: data.counterTitle,
+ detailRecipient: data.detailRecipient,
+ emptyMessage: data.emptyMessage,
+ filter: data.filter,
+ foundMessage: data.foundMessage,
+ page: data.page,
+ recipient: data.recipient,
+ tree: []
+ };
+ data.tree.forEach(element => {
+ if (element.counters.alerts > 0) {
+ element.counters.critical = 0;
+ element.counters.not_init = 0;
+ element.counters.ok = 0;
+ element.counters.unknown = 0;
+ element.counters.warning = 0;
+ element.counters.total = element.counters.alerts;
+
+ newData.tree.push(element);
+ }
+ });
+
+ data = newData;
+ }
if (
typeof data.recipient !== "undefined" &&
data.recipient.length > 0
diff --git a/pandora_console/include/lib/Dashboard/Widgets/groups_status.php b/pandora_console/include/lib/Dashboard/Widgets/groups_status.php
index fec43d000b..bf164fe37f 100755
--- a/pandora_console/include/lib/Dashboard/Widgets/groups_status.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/groups_status.php
@@ -302,9 +302,16 @@ class GroupsStatusWidget extends Widget
);
$data .= '';
- $url = $config['homeurl'];
- $url .= 'index.php?sec=estado&sec2=operation/agentes/estado_agente';
- $url .= '&refr=60&group_id='.$this->values['groupId'];
+ if (is_metaconsole() === true) {
+ $url = $config['homeurl'];
+ $url .= 'index.php?sec=monitoring&sec2=operation/tree&refr=0&tab=group&pure='.$config['pure'];
+ $url .= '&refr=60&searchGroup='.groups_get_name($this->values['groupId']);
+ } else {
+ $url = $config['homeurl'];
+ $url .= 'index.php?sec=estado&sec2=operation/agentes/estado_agente';
+ $url .= '&refr=60&group_id='.$this->values['groupId'];
+ }
+
$data .= '';
$data .= '';
$data .= groups_get_name($this->values['groupId']);
diff --git a/pandora_console/include/lib/Dashboard/Widgets/heatmap.php b/pandora_console/include/lib/Dashboard/Widgets/heatmap.php
index 2f9d9533cd..bca4d704ee 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/heatmap.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/heatmap.php
@@ -264,7 +264,7 @@ class HeatmapWidget extends Widget
// Filters.
$inputs[] = [
'label' => __('Groups'),
- 'style' => ($values['type'] === '0') ? '' : 'display:none',
+ 'style' => ($values['type'] === '0' || $values['type'] === '3') ? '' : 'display:none',
'id' => 'li_groups',
'arguments' => [
'type' => 'select_groups',
@@ -363,6 +363,7 @@ class HeatmapWidget extends Widget
break;
case 0:
+ case 3:
$values['groups'] = \get_parameter('groups', 0);
break;
diff --git a/pandora_console/include/lib/Dashboard/Widgets/tree_view.php b/pandora_console/include/lib/Dashboard/Widgets/tree_view.php
index a351f8b156..1e811c0592 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/tree_view.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/tree_view.php
@@ -239,6 +239,10 @@ class TreeViewWidget extends Widget
$values['agentStatus'] = AGENT_STATUS_UNKNOWN;
break;
+ case 4:
+ $values['agentStatus'] = AGENT_STATUS_ALERT_FIRED;
+ break;
+
case 5:
$values['agentStatus'] = AGENT_STATUS_NOT_INIT;
break;
@@ -292,6 +296,10 @@ class TreeViewWidget extends Widget
$values['moduleStatus'] = AGENT_MODULE_STATUS_NOT_NORMAL;
break;
+ case 'fired':
+ $values['moduleStatus'] = 'fired';
+ break;
+
default:
case -1:
$values['moduleStatus'] = -1;
@@ -389,13 +397,14 @@ class TreeViewWidget extends Widget
// Agents status.
$fields = [
- AGENT_STATUS_ALL => __('All'),
- AGENT_STATUS_NORMAL => __('Normal'),
- AGENT_STATUS_WARNING => __('Warning'),
- AGENT_STATUS_CRITICAL => __('Critical'),
- AGENT_STATUS_UNKNOWN => __('Unknown'),
- AGENT_STATUS_NOT_INIT => __('Not init'),
- AGENT_STATUS_NOT_NORMAL => __('Not normal'),
+ AGENT_STATUS_ALL => __('All'),
+ AGENT_STATUS_NORMAL => __('Normal'),
+ AGENT_STATUS_WARNING => __('Warning'),
+ AGENT_STATUS_CRITICAL => __('Critical'),
+ AGENT_STATUS_UNKNOWN => __('Unknown'),
+ AGENT_STATUS_NOT_INIT => __('Not init'),
+ AGENT_STATUS_NOT_NORMAL => __('Not normal'),
+ AGENT_STATUS_ALERT_FIRED => __('Fired alerts'),
];
$inputs[] = [
@@ -430,6 +439,7 @@ class TreeViewWidget extends Widget
AGENT_MODULE_STATUS_UNKNOWN => __('Unknown'),
AGENT_MODULE_STATUS_NOT_INIT => __('Not init'),
AGENT_MODULE_STATUS_NOT_NORMAL => __('Not normal'),
+ 'fired' => __('Fired alerts'),
];
if (is_metaconsole() === false) {
diff --git a/pandora_console/include/lib/Group.php b/pandora_console/include/lib/Group.php
index 9e386d8dd0..17fca5993b 100644
--- a/pandora_console/include/lib/Group.php
+++ b/pandora_console/include/lib/Group.php
@@ -704,7 +704,7 @@ class Group extends Entity
$agent['total_count'],
$agent['notinit_count']
);
- $data[$key]['alias'] = ''.$agent['alias'].'';
+ $data[$key]['alias'] = ''.$agent['alias'].'';
$data[$key]['status'] = $status_img;
$data[$key]['alerts'] = agents_tree_view_alert_img($agent['fired_count']);
}
diff --git a/pandora_console/include/styles/heatmap.css b/pandora_console/include/styles/heatmap.css
index 12db5cc399..34df84e1c1 100644
--- a/pandora_console/include/styles/heatmap.css
+++ b/pandora_console/include/styles/heatmap.css
@@ -185,8 +185,6 @@
.hover:hover {
filter: brightness(1.5);
- stroke-width: 0.009;
- stroke: black;
}
.group {
@@ -255,13 +253,14 @@ div#heatmap-controls div.heatmap-refr > div {
.title-dialog {
width: 40%;
- font-weight: bold;
+ font-weight: bold !important;
padding-left: 20px;
}
.info-dialog {
width: 60%;
- font-weight: bold;
+ display: flex;
+ align-items: center;
}
.polyline {
@@ -271,17 +270,77 @@ div#heatmap-controls div.heatmap-refr > div {
}
.small-stroke {
- stroke-width: 0.03;
+ stroke-width: 0.005;
+}
+
+.tiny-stroke {
+ stroke-width: 0.01;
+}
+
+.medium-stroke {
+ stroke-width: 0.02;
}
.big-stroke {
- stroke-width: 0.05;
+ stroke-width: 0.03;
+}
+
+.huge-stroke {
+ stroke-width: 0.04;
}
.small-size {
- font-size: 0.2px;
+ font-size: 1%;
+}
+
+.tiny-size {
+ font-size: 2%;
+}
+
+.medium-size {
+ font-size: 4%;
}
.big-size {
- font-size: 0.4px;
+ font-size: 6%;
+}
+
+.huge-size {
+ font-size: 8%;
+}
+
+.progress_main {
+ height: 2.5em;
+ border: 2px solid #82b92e;
+ position: relative;
+ width: 100%;
+ display: inline-block;
+ display: flex;
+ border-radius: 4px;
+ line-height: 9pt;
+ font-size: 9pt;
+}
+
+.progress_main_noborder {
+ height: 2.5em;
+ position: relative;
+ width: 100%;
+ display: inline-block;
+ display: flex;
+}
+
+.progress_main:before {
+ content: attr(data-label);
+ position: absolute;
+ text-align: center;
+ left: 0;
+ right: 0;
+ margin-top: 0.2em;
+}
+
+.progress {
+ width: 0%;
+ background: #82b92e;
+ height: 100%;
+ float: left;
}
diff --git a/pandora_console/include/styles/login.css b/pandora_console/include/styles/login.css
index 4a4ae6f037..4314296d15 100644
--- a/pandora_console/include/styles/login.css
+++ b/pandora_console/include/styles/login.css
@@ -166,7 +166,7 @@ div.login_logo_icon {
div.login_logo_icon img {
margin: 0 auto;
- max-height: 185px;
+ max-height: 150px;
max-width: 300px;
}
@@ -346,19 +346,21 @@ div.text_banner_login {
span.span1 {
display: block;
max-width: 700px;
- font-size: 80pt;
- line-height: 80pt;
+ font-size: 6vw;
+ line-height: 6vw;
font-family: "lato-bolder";
color: #fff;
+ margin-right: 30px;
}
span.span2 {
display: block;
max-width: 700px;
- font-size: 30pt;
- line-height: 30pt;
+ font-size: 3vw;
+ line-height: 3vw;
font-family: "lato-bolder";
color: #fff;
+ margin-right: 30px;
}
div.img_banner_login img {
@@ -384,16 +386,16 @@ div.img_banner_login img {
span.span1 {
display: block;
max-width: 500px;
- font-size: 60pt;
- line-height: 60pt;
+ font-size: 6vw;
+ line-height: 6vw;
font-weight: bold;
color: #fff;
}
span.span2 {
display: block;
max-width: 500px;
- font-size: 20pt;
- line-height: 20pt;
+ font-size: 3vw;
+ line-height: 3vw;
font-family: "lato-bolder";
color: #fff;
}
diff --git a/pandora_console/install.php b/pandora_console/install.php
index 6b4bd88674..b04a20ee94 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -131,7 +131,7 @@
cellpadding = 3;
$table->cellspacing = 3;
$table->width = '98%';
@@ -183,6 +184,7 @@ if ($config['history_db_enabled'] == 1) {
echo '';
+$formtable = new stdClass();
$formtable->width = '98%';
$formtable->class = 'databox';
$formtable->data = [];
diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php
index c79a868f5d..a013ccf8cf 100755
--- a/pandora_console/operation/agentes/estado_generalagente.php
+++ b/pandora_console/operation/agentes/estado_generalagente.php
@@ -331,16 +331,7 @@ if ((bool) $has_remote_conf) {
}
}
-// $table_agent_count_modules .= ui_print_help_tip(__('Agent statuses are re-calculated by the server, they are not shown in real time.'), true);
-/*
- $table_agent = html_print_div(
- [
- 'class' => 'agent_details_header',
- 'content' => $table_agent_header,
- ],
- true
- );
-*/
+
$table_agent = $agentStatusHeader.'
@@ -352,26 +343,6 @@ $table_agent = $agentStatusHeader.'
';
- /*
- $table_agent = '
-
-
-
- '.$table_agent_graph.'
-
- '.$table_agent_count_modules.'
-
-
-
- '.$alive_animation.$table_agent_os.$table_agent_ip.$table_agent_version.$table_agent_description.$remote_cfg.'
-
-
';
-
- */
-
-
/*
* END: TABLE AGENT BUILD.
*/
diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php
index 62a8850b80..048e6a5c2d 100644
--- a/pandora_console/operation/events/events.php
+++ b/pandora_console/operation/events/events.php
@@ -538,22 +538,27 @@ if (is_ajax() === true) {
);
$user_timezone = users_get_user_by_id($_SESSION['id_usuario'])['timezone'];
- if (!$user_timezone) {
- $timezone = timezone_open(date_default_timezone_get());
- $datetime_eur = date_create('now', timezone_open($config['timezone']));
- $dif = timezone_offset_get($timezone, $datetime_eur);
- date($config['date_format'], $dif);
- if (!date('I')) {
- // For summer -3600sec.
- $dif -= 3600;
- }
+ if (empty($user_timezone) === true) {
+ if (date_default_timezone_get() !== $config['timezone']) {
+ $timezone = timezone_open(date_default_timezone_get());
+ $datetime_eur = date_create('now', timezone_open($config['timezone']));
+ $dif = timezone_offset_get($timezone, $datetime_eur);
+ date($config['date_format'], $dif);
+ if (!date('I')) {
+ // For summer -3600sec.
+ $dif -= 3600;
+ }
- $total_sec = strtotime($tmp->timestamp);
- $total_sec += $dif;
- $last_contact = date($config['date_format'], $total_sec);
- $last_contact_value = ui_print_timestamp($last_contact, true);
+ $total_sec = strtotime($tmp->timestamp);
+ $total_sec += $dif;
+ $last_contact = date($config['date_format'], $total_sec);
+ $last_contact_value = ui_print_timestamp($last_contact, true);
+ } else {
+ $title = date($config['date_format'], strtotime($tmp->timestamp));
+ $value = human_time_comparation(strtotime($tmp->timestamp), 'large');
+ $last_contact_value = '
'.$value.'';
+ }
} else {
- $user_timezone = users_get_user_by_id($_SESSION['id_usuario'])['timezone'];
date_default_timezone_set($user_timezone);
$title = date($config['date_format'], strtotime($tmp->timestamp));
$value = human_time_comparation(strtotime($tmp->timestamp), 'large');
@@ -1209,17 +1214,17 @@ foreach ((array) $tags as $id_tag => $tag) {
if (is_array($tag_with) === true
&& ((array_search($id_tag, $tag_with) === false) || (array_search($id_tag, $tag_with) === null))
) {
- $tags_select_with[$id_tag] = ui_print_truncate_text($tag, 50, true);
+ $tags_select_with[$id_tag] = $tag;
} else {
- $tag_with_temp[$id_tag] = ui_print_truncate_text($tag, 50, true);
+ $tag_with_temp[$id_tag] = $tag;
}
if (is_array($tag_without) === true
&& ((array_search($id_tag, $tag_without) === false) || (array_search($id_tag, $tag_without) === null))
) {
- $tags_select_without[$id_tag] = ui_print_truncate_text($tag, 50, true);
+ $tags_select_without[$id_tag] = $tag;
} else {
- $tag_without_temp[$id_tag] = ui_print_truncate_text($tag, 50, true);
+ $tag_without_temp[$id_tag] = $tag;
}
}
@@ -1255,7 +1260,16 @@ $data[0] = html_print_select(
true,
true,
'select_tags',
- false
+ false,
+ false,
+ false,
+ false,
+ false,
+ '',
+ false,
+ false,
+ false,
+ 25
);
$data[1] = html_print_image(
@@ -1297,7 +1311,16 @@ $data[2] = html_print_select(
true,
true,
'select_tags',
- false
+ false,
+ false,
+ false,
+ false,
+ false,
+ '',
+ false,
+ false,
+ false,
+ 25
);
$tabletags_with->data[] = $data;
@@ -1330,7 +1353,16 @@ $data[0] = html_print_select(
true,
true,
'select_tags',
- false
+ false,
+ false,
+ false,
+ false,
+ false,
+ '',
+ false,
+ false,
+ false,
+ 25
);
$data[1] = html_print_image(
'images/darrowright.png',
@@ -1368,7 +1400,16 @@ $data[2] = html_print_select(
true,
true,
'select_tags',
- false
+ false,
+ false,
+ false,
+ false,
+ false,
+ '',
+ false,
+ false,
+ false,
+ 25
);
$tabletags_without->data[] = $data;
$tabletags_without->rowclass[] = '';
diff --git a/pandora_console/operation/search_modules.php b/pandora_console/operation/search_modules.php
index 29c6fb7fcb..2cdda78b4a 100644
--- a/pandora_console/operation/search_modules.php
+++ b/pandora_console/operation/search_modules.php
@@ -22,6 +22,9 @@ $searchModules = check_acl($config['id_user'], 0, 'AR');
if (!$modules || !$searchModules) {
echo "
".__('Zero results found')."
\n";
} else {
+ // Show the modal window of an module.
+ echo '
';
+
$table = new stdClass();
$table->cellpadding = 4;
$table->cellspacing = 4;
@@ -173,14 +176,16 @@ if (!$modules || !$searchModules) {
$win_handle = dechex(crc32($module['id_agente_modulo'].$module['module_name']));
$link = "winopeng('".'operation/agentes/stat_win.php?'."type=$graph_type&".'period='.SECONDS_1DAY.'&id='.$module['id_agente_modulo'].'&refresh='.SECONDS_10MINUTES."', "."'day_".$win_handle."')";
+ $link_module_detail = 'show_module_detail_dialog('.$module['id_agente_modulo'].', '.$module['id_agente'].', '."'', 0, ".SECONDS_1DAY.", '".$module['module_name']."')";
- $graphCell = '
'.html_print_image('images/chart_curve.png', true, ['border' => 0, 'alt' => '']).'';
- $graphCell .= ' '."
".html_print_image(
- 'images/binary.png',
+ $graphCell = ''.html_print_image('images/module-graph.svg', true, ['border' => 0, 'alt' => '', 'class' => 'main_menu_icon invert_filter' ]).'';
+ $graphCell .= '
'.html_print_image(
+ 'images/simple-value.svg',
true,
[
'border' => '0',
'alt' => '',
+ 'class' => 'main_menu_icon invert_filter',
]
).'';
}
@@ -258,3 +263,105 @@ if (!$modules || !$searchModules) {
]
);
}
+
+ui_include_time_picker();
+ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript/i18n/');
+
+?>
+
+
\ No newline at end of file
diff --git a/pandora_console/operation/tree.php b/pandora_console/operation/tree.php
index 35f960744b..8ca4343ea0 100755
--- a/pandora_console/operation/tree.php
+++ b/pandora_console/operation/tree.php
@@ -210,6 +210,7 @@ $agent_status_arr[AGENT_STATUS_WARNING] = __('Warning');
$agent_status_arr[AGENT_STATUS_CRITICAL] = __('Critical');
$agent_status_arr[AGENT_STATUS_UNKNOWN] = __('Unknown');
$agent_status_arr[AGENT_STATUS_NOT_INIT] = __('Not init');
+$agent_status_arr[AGENT_STATUS_ALERT_FIRED] = __('Fired alerts');
$table->data['group_row'][] = html_print_label_input_block(
__('Search group'),
@@ -271,7 +272,7 @@ $table->data['agent_row'][] = html_print_label_input_block(
0,
true,
false,
- true,
+ false,
'',
false,
'width:100%'
@@ -300,6 +301,7 @@ if (is_metaconsole() === false) {
$module_status_arr[AGENT_MODULE_STATUS_CRITICAL_BAD] = __('Critical');
$module_status_arr[AGENT_MODULE_STATUS_UNKNOWN] = __('Unknown');
$module_status_arr[AGENT_MODULE_STATUS_NOT_INIT] = __('Not init');
+ $module_status_arr['fired'] = __('Fired alerts');
$table->data['last_row'][] = html_print_label_input_block(
__('Search module'),
@@ -322,7 +324,7 @@ if (is_metaconsole() === false) {
0,
true,
false,
- true,
+ false,
'',
false,
'width:100%'
@@ -380,7 +382,7 @@ html_print_div(
]
);
-$infoHeadTitle = 'Sombra oscura';
+$infoHeadTitle = '';
?>
diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec
index 622a50cdbf..425e872184 100644
--- a/pandora_console/pandora_console.redhat.spec
+++ b/pandora_console/pandora_console.redhat.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.770
-%define release 230412
+%define release 230417
# User and Group under which Apache is running
%define httpd_name httpd
diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec
index 7caa491505..72314c9d28 100644
--- a/pandora_console/pandora_console.rhel7.spec
+++ b/pandora_console/pandora_console.rhel7.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.770
-%define release 230412
+%define release 230417
# User and Group under which Apache is running
%define httpd_name httpd
diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec
index f4fe888c1f..32ef21ff00 100644
--- a/pandora_console/pandora_console.spec
+++ b/pandora_console/pandora_console.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.770
-%define release 230412
+%define release 230417
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2
diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control
index b95a571783..6ef2d67f18 100644
--- a/pandora_server/DEBIAN/control
+++ b/pandora_server/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-server
-Version: 7.0NG.770-230412
+Version: 7.0NG.770-230417
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh
index 68ae2b89a8..75033f2320 100644
--- a/pandora_server/DEBIAN/make_deb_package.sh
+++ b/pandora_server/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.770-230412"
+pandora_version="7.0NG.770-230417"
package_cpan=0
package_pandora=1
diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm
index 34cf96c156..b2b15c5412 100644
--- a/pandora_server/lib/PandoraFMS/Config.pm
+++ b/pandora_server/lib/PandoraFMS/Config.pm
@@ -46,7 +46,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.770";
-my $pandora_build = "230412";
+my $pandora_build = "230417";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash
diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm
index b7bce61ab7..547bee4167 100644
--- a/pandora_server/lib/PandoraFMS/PluginTools.pm
+++ b/pandora_server/lib/PandoraFMS/PluginTools.pm
@@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.770";
-my $pandora_build = "230412";
+my $pandora_build = "230417";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec
index c68de12d80..04168ecda2 100644
--- a/pandora_server/pandora_server.redhat.spec
+++ b/pandora_server/pandora_server.redhat.spec
@@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_server
%define version 7.0NG.770
-%define release 230412
+%define release 230417
Summary: Pandora FMS Server
Name: %{name}
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index 15e51e708e..4ce44aeb4c 100644
--- a/pandora_server/pandora_server.spec
+++ b/pandora_server/pandora_server.spec
@@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_server
%define version 7.0NG.770
-%define release 230412
+%define release 230417
Summary: Pandora FMS Server
Name: %{name}
diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer
index f4e1c6fc17..0113046258 100755
--- a/pandora_server/pandora_server_installer
+++ b/pandora_server/pandora_server_installer
@@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.770"
-PI_BUILD="230412"
+PI_BUILD="230417"
MODE=$1
if [ $# -gt 1 ]; then
diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl
index 5bd6b2c82a..ca5083da71 100755
--- a/pandora_server/util/pandora_db.pl
+++ b/pandora_server/util/pandora_db.pl
@@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
-my $version = "7.0NG.770 Build 230412";
+my $version = "7.0NG.770 Build 230417";
# Pandora server configuration
my %conf;
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index 5bcea96243..d4293d9edf 100755
--- a/pandora_server/util/pandora_manage.pl
+++ b/pandora_server/util/pandora_manage.pl
@@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
-my $version = "7.0NG.770 Build 230412";
+my $version = "7.0NG.770 Build 230417";
# save program name for logging
my $progname = basename($0);