mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Merge remote-tracking branch 'origin/develop' into ent-9662-Restyling-fuentes-colores-botones
Conflicts: pandora_console/godmode/users/user_list.php pandora_console/operation/events/events.php
This commit is contained in:
commit
8230ae616b
@ -9,7 +9,7 @@
|
||||
# RedHat 8.5
|
||||
|
||||
#Constants
|
||||
S_VERSION='202302081'
|
||||
S_VERSION='202302201'
|
||||
LOGFILE="/tmp/deploy-ext-db-$(date +%F).log"
|
||||
|
||||
|
||||
@ -275,6 +275,8 @@ EO_CONFIG_F
|
||||
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"
|
||||
|
@ -4,6 +4,7 @@
|
||||
##############################################################################################################
|
||||
## Tested versions ##
|
||||
# Ubuntu 22.04.1
|
||||
# Ubuntu 22.04.2
|
||||
|
||||
#avoid promps
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
@ -16,7 +17,7 @@ PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
||||
WORKDIR=/opt/pandora/deploy
|
||||
|
||||
|
||||
S_VERSION='202302081'
|
||||
S_VERSION='202302201'
|
||||
LOGFILE="/tmp/deploy-ext-db-$(date +%F).log"
|
||||
rm -f $LOGFILE &> /dev/null # remove last log before start
|
||||
|
||||
@ -181,7 +182,7 @@ cat > /etc/mysql/my.cnf << EOF_DB
|
||||
[mysqld]
|
||||
datadir=/var/lib/mysql
|
||||
user=mysql
|
||||
character-set-server=utf8
|
||||
character-set-server=utf8mb4
|
||||
skip-character-set-client-handshake
|
||||
# Disabling symbolic-links is recommended to prevent assorted security risks
|
||||
symbolic-links=0
|
||||
@ -196,7 +197,7 @@ innodb_flush_log_at_trx_commit = 0
|
||||
innodb_flush_method = O_DIRECT
|
||||
innodb_log_file_size = 64M
|
||||
innodb_log_buffer_size = 16M
|
||||
innodb_io_capacity = 100
|
||||
innodb_io_capacity = 300
|
||||
thread_cache_size = 8
|
||||
thread_stack = 256K
|
||||
max_connections = 100
|
||||
|
@ -431,7 +431,7 @@ execute_cmd "curl -LSs --output pandorafms_agent_linux-7.0NG.noarch.rpm ${PANDOR
|
||||
execute_cmd "yum install -y $HOME/pandora_deploy_tmp/pandorafms*.rpm" "installing PandoraFMS packages"
|
||||
|
||||
# Copy gotty utility
|
||||
execute_cmd "wget https://pandorafms.com/library/wp-content/uploads/2019/11/gotty_linux_amd64.tar.gz" 'Dowloading gotty util'
|
||||
execute_cmd "wget https://firefly.pandorafms.com/pandorafms/utils/gotty_linux_amd64.tar.gz" 'Dowloading gotty util'
|
||||
tar xvzf gotty_linux_amd64.tar.gz &>> $LOGFILE
|
||||
execute_cmd "mv gotty /usr/bin/" 'Installing gotty util'
|
||||
|
||||
@ -639,8 +639,8 @@ systemctl enable tentacle_serverd &>> $LOGFILE
|
||||
execute_cmd "service tentacle_serverd start" "Starting Tentacle Server"
|
||||
|
||||
# Enabling condole cron
|
||||
execute_cmd "echo \"* * * * * root wget -q -O - --no-check-certificate http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log\" >> /etc/crontab" "Enabling Pandora FMS Console cron"
|
||||
echo "* * * * * root wget -q -O - --no-check-certificate http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log" >> /etc/crontab
|
||||
execute_cmd "echo \"* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log\" >> /etc/crontab" "Enabling Pandora FMS Console cron"
|
||||
echo "* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log" >> /etc/crontab
|
||||
## Enabling agent
|
||||
systemctl enable pandora_agent_daemon &>> $LOGFILE
|
||||
execute_cmd "systemctl start pandora_agent_daemon" "Starting Pandora FMS Agent"
|
||||
|
@ -5,7 +5,7 @@
|
||||
## Tested versions ##
|
||||
# Centos 8.4, 8.5
|
||||
# Rocky 8.4, 8.5, 8.6, 8.7
|
||||
# Almalinuz 8.4, 8.5
|
||||
# Almalinux 8.4, 8.5
|
||||
# RedHat 8.5
|
||||
|
||||
#Constants
|
||||
@ -14,7 +14,7 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
|
||||
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
||||
|
||||
|
||||
S_VERSION='202301251'
|
||||
S_VERSION='202302201'
|
||||
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
||||
|
||||
# define default variables
|
||||
@ -107,6 +107,17 @@ check_root_permissions () {
|
||||
fi
|
||||
}
|
||||
|
||||
installing_docker () {
|
||||
#Installing docker for debug
|
||||
echo "Start installig docker" &>> "$LOGFILE"
|
||||
dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo &>> "$LOGFILE"
|
||||
dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin &>> "$LOGFILE"
|
||||
systemctl disable --now docker &>> "$LOGFILE"
|
||||
systemctl disable docker.socket --now &>> "$LOGFILE"
|
||||
echo "End installig docker" &>> "$LOGFILE"
|
||||
}
|
||||
|
||||
|
||||
## Main
|
||||
echo "Starting PandoraFMS Community deployment EL8 ver. $S_VERSION"
|
||||
|
||||
@ -207,6 +218,7 @@ else
|
||||
execute_cmd "dnf config-manager --set-enabled powertools" "Configuring Powertools"
|
||||
fi
|
||||
|
||||
execute_cmd "installing_docker" "Installing Docker for debug"
|
||||
|
||||
#Installing wget
|
||||
execute_cmd "dnf install -y wget" "Installing wget"
|
||||
@ -454,7 +466,7 @@ innodb_flush_log_at_trx_commit = 0
|
||||
innodb_flush_method = O_DIRECT
|
||||
innodb_log_file_size = 64M
|
||||
innodb_log_buffer_size = 16M
|
||||
innodb_io_capacity = 100
|
||||
innodb_io_capacity = 300
|
||||
thread_cache_size = 8
|
||||
thread_stack = 256K
|
||||
max_connections = 100
|
||||
@ -483,6 +495,7 @@ EO_CONFIG_F
|
||||
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"
|
||||
@ -517,7 +530,7 @@ execute_cmd "curl -LSs --output pandorafms_agent_linux-7.0NG.noarch.rpm ${PANDOR
|
||||
execute_cmd "dnf install -y $HOME/pandora_deploy_tmp/pandorafms*.rpm" "Installing Pandora FMS packages"
|
||||
|
||||
# Copy gotty utility
|
||||
execute_cmd "wget https://pandorafms.com/library/wp-content/uploads/2019/11/gotty_linux_amd64.tar.gz" 'Dowloading gotty util'
|
||||
execute_cmd "wget https://firefly.pandorafms.com/pandorafms/utils/gotty_linux_amd64.tar.gz" 'Dowloading gotty util'
|
||||
tar xvzf gotty_linux_amd64.tar.gz &>> $LOGFILE
|
||||
execute_cmd "mv gotty /usr/bin/" 'Installing gotty util'
|
||||
|
||||
@ -732,8 +745,8 @@ systemctl enable tentacle_serverd &>> "$LOGFILE"
|
||||
execute_cmd "service tentacle_serverd start" "Starting Tentacle Server"
|
||||
|
||||
# Enabling condole cron
|
||||
execute_cmd "echo \"* * * * * root wget -q -O - --no-check-certificate http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log\" >> /etc/crontab" "Enabling Pandora FMS Console cron"
|
||||
echo "* * * * * root wget -q -O - --no-check-certificate http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log" >> /etc/crontab
|
||||
execute_cmd "echo \"* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log\" >> /etc/crontab" "Enabling Pandora FMS Console cron"
|
||||
echo "* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log" >> /etc/crontab
|
||||
## Enabling agent
|
||||
systemctl enable pandora_agent_daemon &>> "$LOGFILE"
|
||||
execute_cmd "systemctl start pandora_agent_daemon" "Starting Pandora FMS Agent"
|
||||
@ -743,7 +756,7 @@ execute_cmd "systemctl start pandora_agent_daemon" "Starting Pandora FMS Agent"
|
||||
|
||||
cat > /etc/issue.net << EOF_banner
|
||||
|
||||
Welcome to Pandora FMS appliance on CentOS
|
||||
Welcome to Pandora FMS appliance on RHEL/Rocky Linux 8
|
||||
------------------------------------------
|
||||
Go to Public http://$ipplublic/pandora_console$to to login web console
|
||||
$(ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v "172.17.0.1" | awk '{print $2}' | awk -F '/' '{print "Go to Local http://"$1"/pandora_console to login web console"}')
|
||||
|
@ -4,6 +4,7 @@
|
||||
##############################################################################################################
|
||||
## Tested versions ##
|
||||
# Ubuntu 22.04.1
|
||||
# Ubuntu 22.04.2
|
||||
|
||||
#avoid promps
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
@ -16,7 +17,7 @@ PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
||||
WORKDIR=/opt/pandora/deploy
|
||||
|
||||
|
||||
S_VERSION='202301251'
|
||||
S_VERSION='202302201'
|
||||
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
||||
rm -f $LOGFILE &> /dev/null # remove last log before start
|
||||
|
||||
@ -106,6 +107,21 @@ check_root_permissions () {
|
||||
fi
|
||||
}
|
||||
|
||||
installing_docker () {
|
||||
#Installing docker for debug
|
||||
echo "Start installig docker" &>> "$LOGFILE"
|
||||
mkdir -m 0755 -p /etc/apt/keyrings &>> "$LOGFILE"
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --yes --dearmor -o /etc/apt/keyrings/docker.gpg &>> "$LOGFILE"
|
||||
echo \
|
||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
|
||||
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list &>> "$LOGFILE"
|
||||
apt update -y &>> "$LOGFILE"
|
||||
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin &>> "$LOGFILE"
|
||||
systemctl disable docker --now &>> "$LOGFILE"
|
||||
systemctl disable docker.socket --now &>> "$LOGFILE"
|
||||
echo "End installig docker" &>> "$LOGFILE"
|
||||
}
|
||||
|
||||
## Main
|
||||
echo "Starting PandoraFMS Community deployment Ubuntu 22.04 ver. $S_VERSION"
|
||||
|
||||
@ -173,7 +189,7 @@ execute_cmd "cd $WORKDIR" "Moving to workdir: $WORKDIR"
|
||||
|
||||
## Install utils
|
||||
execute_cmd "apt update" "Updating repos"
|
||||
execute_cmd "apt install -y net-tools vim curl wget software-properties-common apt-transport-https" "Installing utils"
|
||||
execute_cmd "apt install -y net-tools vim curl wget software-properties-common apt-transport-https ca-certificates gnupg lsb-release" "Installing utils"
|
||||
|
||||
#Installing Apache and php-fpm
|
||||
[ -e "/etc/apt/sources.list.d/ondrej-ubuntu-php-jammy.list" ] || execute_cmd "add-apt-repository ppa:ondrej/php -y" "Enable ppa:ondrej/php repo"
|
||||
@ -221,7 +237,8 @@ systemctl restart php$PHPVER-fpm &>> "$LOGFILE"
|
||||
php$PHPVER-xml \
|
||||
php$PHPVER-yaml \
|
||||
libnet-telnet-perl \
|
||||
whois"
|
||||
whois \
|
||||
cron"
|
||||
execute_cmd "apt install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
|
||||
|
||||
# Server dependencies
|
||||
@ -254,10 +271,13 @@ server_dependencies=" \
|
||||
libnet-telnet-perl \
|
||||
libjson-perl \
|
||||
libencode-perl \
|
||||
cron \
|
||||
libgeo-ip-perl \
|
||||
openjdk-8-jdk "
|
||||
execute_cmd "apt install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
|
||||
|
||||
execute_cmd "installing_docker" "Installing Docker for debug"
|
||||
|
||||
# wmic and pandorawmic
|
||||
execute_cmd "curl -O https://firefly.artica.es/pandorafms/utils/bin/wmic" "Downloading wmic"
|
||||
execute_cmd "curl -O https://firefly.artica.es/pandorafms/utils/bin/pandorawmic" "Downloading pandorawmic"
|
||||
@ -393,7 +413,7 @@ cat > /etc/mysql/my.cnf << EOF_DB
|
||||
[mysqld]
|
||||
datadir=/var/lib/mysql
|
||||
user=mysql
|
||||
character-set-server=utf8
|
||||
character-set-server=utf8mb4
|
||||
skip-character-set-client-handshake
|
||||
# Disabling symbolic-links is recommended to prevent assorted security risks
|
||||
symbolic-links=0
|
||||
@ -408,7 +428,7 @@ innodb_flush_log_at_trx_commit = 0
|
||||
innodb_flush_method = O_DIRECT
|
||||
innodb_log_file_size = 64M
|
||||
innodb_log_buffer_size = 16M
|
||||
innodb_io_capacity = 100
|
||||
innodb_io_capacity = 300
|
||||
thread_cache_size = 8
|
||||
thread_stack = 256K
|
||||
max_connections = 100
|
||||
@ -477,7 +497,7 @@ check_cmd_status "Error installing PandoraFMS Agent"
|
||||
|
||||
# Copy gotty utility
|
||||
cd $WORKDIR &>> "$LOGFILE"
|
||||
execute_cmd "wget https://pandorafms.com/library/wp-content/uploads/2019/11/gotty_linux_amd64.tar.gz" 'Dowloading gotty util'
|
||||
execute_cmd "wget https://firefly.pandorafms.com/pandorafms/utils/gotty_linux_amd64.tar.gz" 'Dowloading gotty util'
|
||||
tar xvzf gotty_linux_amd64.tar.gz &>> $LOGFILE
|
||||
execute_cmd "mv gotty /usr/bin/" 'Installing gotty util'
|
||||
|
||||
@ -731,9 +751,14 @@ systemctl enable pandora_server &>> "$LOGFILE"
|
||||
execute_cmd "service tentacle_serverd start" "Starting Tentacle Server"
|
||||
systemctl enable tentacle_serverd &>> "$LOGFILE"
|
||||
|
||||
# Enabling condole cron
|
||||
execute_cmd "echo \"* * * * * root wget -q -O - --no-check-certificate http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log\" >> /etc/crontab" "Enabling Pandora FMS Console cron"
|
||||
echo "* * * * * root wget -q -O - --no-check-certificate http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log" >> /etc/crontab
|
||||
# Enabling console cron
|
||||
execute_cmd "echo \"* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log\" >> /etc/crontab" "Enabling Pandora FMS Console cron"
|
||||
echo "* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log" >> /etc/crontab
|
||||
|
||||
# Enabling pandoradb cron
|
||||
execute_cmd "echo 'enabling pandoradb cron' >> $PANDORA_CONSOLE/log/cron.log\" >> /etc/crontab" "Enabling Pandora FMS pandoradb cron"
|
||||
echo "@hourly root bash -c /etc/cron.hourly/pandora_db" >> /etc/crontab
|
||||
|
||||
|
||||
## Enabling agent adn configuring Agente
|
||||
sed -i "s/^remote_config.*$/remote_config 1/g" $PANDORA_AGENT_CONF &>> "$LOGFILE"
|
||||
@ -748,7 +773,7 @@ sed --follow-symlinks -i -e "s/^openssl_conf = openssl_init/#openssl_conf = open
|
||||
|
||||
cat > /etc/issue.net << EOF_banner
|
||||
|
||||
Welcome to Pandora FMS appliance on CentOS
|
||||
Welcome to Pandora FMS appliance on Ubuntu
|
||||
------------------------------------------
|
||||
Go to Public http://$ipplublic/pandora_console$to to login web console
|
||||
$(ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v "172.17.0.1" | awk '{print $2}' | awk -F '/' '{print "Go to Local http://"$1"/pandora_console to login web console"}')
|
||||
|
@ -277,8 +277,8 @@ export ORACLE_HOME=/usr/lib/oracle/$VERSION/client64
|
||||
EOF_ENV
|
||||
|
||||
echo ">> Enable discovery cron: "
|
||||
#while true ; do wget -q -O - --no-check-certificate http://localhost/pandora_console/enterprise/cron.php >> /var/www/html/pandora_console/pandora_console.log && sleep 60 ; done &
|
||||
echo "*/5 * * * * wget -q -O - --no-check-certificate http://localhost/pandora_console/enterprise/cron.php >> /var/www/html/pandora_console/log/cron.log" >> /opt/pandora/crontasks
|
||||
#while true ; do wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://localhost/pandora_console/enterprise/cron.php >> /var/www/html/pandora_console/pandora_console.log && sleep 60 ; done &
|
||||
echo "*/5 * * * * wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://localhost/pandora_console/enterprise/cron.php >> /var/www/html/pandora_console/log/cron.log" >> /opt/pandora/crontasks
|
||||
|
||||
echo ">> Enable pandora_db cron: "
|
||||
/usr/bin/perl /usr/share/pandora_server/util/pandora_db.pl /etc/pandora/pandora_server.conf
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.768, AIX version
|
||||
# Version 7.0NG.769, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.768, FreeBSD Version
|
||||
# Version 7.0NG.769, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.768, HP-UX Version
|
||||
# Version 7.0NG.769, HP-UX Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.768, GNU/Linux
|
||||
# Version 7.0NG.769, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.768, GNU/Linux
|
||||
# Version 7.0NG.769, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.768, Solaris Version
|
||||
# Version 7.0NG.769, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Base config file for Pandora FMS Windows Agent
|
||||
# (c) 2006-2021 Artica Soluciones Tecnologicas
|
||||
# Version 7.0NG.768
|
||||
# Version 7.0NG.769
|
||||
# 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
|
||||
|
@ -1,6 +1,7 @@
|
||||
#
|
||||
#Pandora FMS Linux Agent
|
||||
#
|
||||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 4.0
|
||||
%define release 1
|
||||
|
@ -1,6 +1,7 @@
|
||||
#
|
||||
#Pandora FMS Linux Agent
|
||||
#
|
||||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 4.0.1
|
||||
%define release 1
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.768, AIX version
|
||||
# Version 7.0NG.769, AIX version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.768
|
||||
# Version 7.0NG.769
|
||||
# FreeBSD/IPSO version
|
||||
# Licenced under GPL licence, 2003-2007 Sancho Lerena
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.768, HPUX Version
|
||||
# Version 7.0NG.769, HPUX Version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.768
|
||||
# Version 7.0NG.769
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
@ -1,6 +1,7 @@
|
||||
#
|
||||
#Pandora FMS Linux Agent
|
||||
#
|
||||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent
|
||||
%define version 3.2
|
||||
Summary: Pandora FMS Linux agent
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.768
|
||||
# Version 7.0NG.769
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.768
|
||||
# Version 7.0NG.769
|
||||
# Licensed under GPL license v2,
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.768, Solaris version
|
||||
# Version 7.0NG.769, Solaris version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.768, AIX version
|
||||
# Version 7.0NG.769, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.768-230210
|
||||
Version: 7.0NG.769-230222
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
@ -14,7 +14,7 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.768-230210"
|
||||
pandora_version="7.0NG.769-230222"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
@ -31,7 +31,7 @@ fi
|
||||
if [ "$#" -ge 2 ]; then
|
||||
VERSION="$2"
|
||||
else
|
||||
VERSION="7.0NG.768"
|
||||
VERSION="7.0NG.769"
|
||||
fi
|
||||
|
||||
# Path for the generated DMG file
|
||||
|
@ -19,11 +19,11 @@
|
||||
<choice id="com.pandorafms.pandorafms_src" visible="false">
|
||||
<pkg-ref id="com.pandorafms.pandorafms_src"/>
|
||||
</choice>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.768" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.769" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
||||
<choice id="com.pandorafms.pandorafms_uninstall" visible="true" customLocation="/Applications">
|
||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall"/>
|
||||
</choice>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.768" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.769" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
||||
<!-- <installation-check script="check()" />
|
||||
<script>
|
||||
<![CDATA[
|
||||
|
@ -5,9 +5,9 @@
|
||||
<key>CFBundleIconFile</key> <string>pandorafms.icns</string>
|
||||
<key>CFBundleIdentifier</key> <string>com.pandorafms.pandorafms_uninstall</string>
|
||||
|
||||
<key>CFBundleVersion</key> <string>7.0NG.768</string>
|
||||
<key>CFBundleGetInfoString</key> <string>7.0NG.768 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
|
||||
<key>CFBundleShortVersionString</key> <string>7.0NG.768</string>
|
||||
<key>CFBundleVersion</key> <string>7.0NG.769</string>
|
||||
<key>CFBundleGetInfoString</key> <string>7.0NG.769 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
|
||||
<key>CFBundleShortVersionString</key> <string>7.0NG.769</string>
|
||||
|
||||
<key>NSPrincipalClass</key><string>NSApplication</string>
|
||||
<key>NSMainNibFile</key><string>MainMenu</string>
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.768, GNU/Linux
|
||||
# Version 7.0NG.769, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.768, FreeBSD Version
|
||||
# Version 7.0NG.769, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.768, HP-UX Version
|
||||
# Version 7.0NG.769, HP-UX Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.768, GNU/Linux
|
||||
# Version 7.0NG.769, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.768, GNU/Linux
|
||||
# Version 7.0NG.769, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.768, NetBSD Version
|
||||
# Version 7.0NG.769, NetBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.768, Solaris Version
|
||||
# Version 7.0NG.769, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -556,10 +556,19 @@ BEGIN {
|
||||
sub runCommand {
|
||||
my ($self, $ref, $output_mode) = @_;
|
||||
|
||||
my $result;
|
||||
if($self->load_libraries()) {
|
||||
# Functionality possible.
|
||||
my $command = $self->{'commands'}->{$ref};
|
||||
my $result = $self->evaluate_command($ref);
|
||||
$result = $self->evaluate_command($ref);
|
||||
} else {
|
||||
$result = {
|
||||
'stderr' => 'Cannot use commands without YAML dependency, please install it.',
|
||||
'name' => 'YAML::Tiny',
|
||||
'error_level' => 2,
|
||||
};
|
||||
}
|
||||
|
||||
if (ref($result) eq "HASH") {
|
||||
# Process command result.
|
||||
if (defined($output_mode) && $output_mode eq 'xml') {
|
||||
@ -580,7 +589,6 @@ BEGIN {
|
||||
} else {
|
||||
$self->set_last_error('Failed to process ['.$ref.']: '.$result);
|
||||
}
|
||||
}
|
||||
|
||||
return undef;
|
||||
}
|
||||
@ -1014,8 +1022,8 @@ my $Sem = undef;
|
||||
# Semaphore used to control the number of threads
|
||||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.768';
|
||||
use constant AGENT_BUILD => '230210';
|
||||
use constant AGENT_VERSION => '7.0NG.769';
|
||||
use constant AGENT_BUILD => '230222';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
@ -1,9 +1,10 @@
|
||||
#
|
||||
#Pandora FMS Linux Agent
|
||||
#
|
||||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.768
|
||||
%define release 230210
|
||||
%define version 7.0NG.769
|
||||
%define release 230222
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -1,9 +1,10 @@
|
||||
#
|
||||
#Pandora FMS Linux Agent
|
||||
#
|
||||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.768
|
||||
%define release 230210
|
||||
%define version 7.0NG.769
|
||||
%define release 230222
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -9,8 +9,8 @@
|
||||
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.768"
|
||||
PI_BUILD="230210"
|
||||
PI_VERSION="7.0NG.769"
|
||||
PI_BUILD="230222"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Base config file for Pandora FMS Windows Agent
|
||||
# (c) 2006-2021 Artica Soluciones Tecnologicas
|
||||
# Version 7.0NG.768
|
||||
# Version 7.0NG.769
|
||||
# This program is Free Software, you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public Licence as published by the Free Software
|
||||
# Foundation; either version 2 of the Licence or any later version
|
||||
|
@ -3,7 +3,7 @@ AllowLanguageSelection
|
||||
{Yes}
|
||||
|
||||
AppName
|
||||
{Pandora FMS Windows Agent v7.0NG.768}
|
||||
{Pandora FMS Windows Agent v7.0NG.769}
|
||||
|
||||
ApplicationID
|
||||
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
||||
@ -186,7 +186,7 @@ UpgradeApplicationID
|
||||
{}
|
||||
|
||||
Version
|
||||
{230210}
|
||||
{230222}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
||||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.768 Build 230210")
|
||||
#define PANDORA_VERSION ("7.0NG.769 Build 230222")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
@ -11,7 +11,7 @@ BEGIN
|
||||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.768(Build 230210))"
|
||||
VALUE "ProductVersion", "(7.0NG.769(Build 230222))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
@ -1,5 +1,5 @@
|
||||
package: pandorafms-console
|
||||
Version: 7.0NG.768-230210
|
||||
Version: 7.0NG.769-230222
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
@ -14,7 +14,7 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.768-230210"
|
||||
pandora_version="7.0NG.769-230222"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
@ -2,6 +2,8 @@ START TRANSACTION;
|
||||
|
||||
ALTER TABLE `tserver` ADD COLUMN `server_keepalive_utimestamp` BIGINT NOT NULL DEFAULT 0;
|
||||
|
||||
ALTER TABLE `tmap` MODIFY COLUMN `id_group` TEXT NOT NULL default '';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `tmonitor_filter` (
|
||||
`id_filter` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_name` VARCHAR(600) NOT NULL,
|
||||
|
@ -402,6 +402,10 @@ echo '
|
||||
echo '<div id="ver_num">'.$pandora_version.(($develop_bypass == 1) ? ' '.__('Build').' '.$build_version : '').'</div>';
|
||||
|
||||
// CSRF validation.
|
||||
if (isset($_SESSION['csrf_code']) === true) {
|
||||
unset($_SESSION['csrf_code']);
|
||||
}
|
||||
|
||||
html_print_csrf_hidden();
|
||||
|
||||
echo '</form></div>';
|
||||
|
@ -992,7 +992,7 @@ if (($create != '') || ($view != '')) {
|
||||
echo '<div id="deploy_messages" class="invisible">';
|
||||
}
|
||||
|
||||
// The '%s' will be replaced in the javascript code of the function 'show_locked_dialog'
|
||||
// The '%s' will be replaced in the javascript code of the function 'show_locked_dialog'.
|
||||
echo "<div id='dialog_locked' title='".__('List of modules and components created by "%s" ')."' class='invisible left'>";
|
||||
echo '</div>';
|
||||
|
||||
@ -1041,12 +1041,11 @@ ui_require_javascript_file('pandora_modules');
|
||||
data: parameters,
|
||||
dataType: "html",
|
||||
success: function(data) {
|
||||
var title = $("#dialog_locked").prop('title').replace(/%s/, plugin_name);
|
||||
|
||||
var title = 'List of modules and components created by "'+ plugin_name +'"';
|
||||
$("#dialog_locked")
|
||||
.prop('title', title)
|
||||
.html(data)
|
||||
.dialog ({
|
||||
title: title,
|
||||
resizable: true,
|
||||
draggable: true,
|
||||
modal: true,
|
||||
@ -1062,7 +1061,6 @@ ui_require_javascript_file('pandora_modules');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
// Add macro
|
||||
var add_macro_click_event = function (event) {
|
||||
|
@ -416,6 +416,11 @@ if ($delete_user === true) {
|
||||
__('There was a problem deleting the profile')
|
||||
);
|
||||
} else if ($disable_user !== false) {
|
||||
// CSRF Validator.
|
||||
if (html_print_csrf_error()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Disable_user.
|
||||
$id_user = get_parameter('id', 0);
|
||||
|
||||
@ -662,6 +667,8 @@ $limit = (int) $config['block_size'];
|
||||
$rowPair = true;
|
||||
$iterator = 0;
|
||||
$cont = 0;
|
||||
// Creates csrf.
|
||||
$csrf = html_print_csrf_hidden(true);
|
||||
foreach ($info as $user_id => $user_info) {
|
||||
if (empty($user_id) === true) {
|
||||
continue;
|
||||
@ -854,6 +861,8 @@ foreach ($info as $user_id => $user_info) {
|
||||
$user_info['id_user'],
|
||||
true
|
||||
);
|
||||
// Same csrf for every disable button for submit.
|
||||
$data[6] .= $csrf;
|
||||
$data[6] .= html_print_input_hidden(
|
||||
'disable_user',
|
||||
$toDoAction,
|
||||
|
@ -92,6 +92,9 @@ $node_id = (int) get_parameter('node_id', 0);
|
||||
if ($get_comments === true) {
|
||||
$event = get_parameter('event', false);
|
||||
$event_rep = (int) get_parameter('event_rep', 0);
|
||||
$event_rep = get_parameter_post('event')['event_rep'];
|
||||
$group_rep = get_parameter_post('event')['group_rep'];
|
||||
|
||||
if ($event === false) {
|
||||
return __('Failed to retrieve comments');
|
||||
}
|
||||
@ -99,7 +102,7 @@ if ($get_comments === true) {
|
||||
$eventsGrouped = [];
|
||||
// Consider if the event is grouped.
|
||||
$whereGrouped = '1=1';
|
||||
if ($event_rep === EVENT_GROUP_REP_EVENTS) {
|
||||
if ($group_rep === EVENT_GROUP_REP_EVENTS && $event_rep > 1) {
|
||||
// Default grouped message filtering (evento and estado).
|
||||
$whereGrouped = sprintf(
|
||||
'`evento` = "%s"',
|
||||
@ -120,7 +123,7 @@ if ($get_comments === true) {
|
||||
(int) $event['id_agentmodule']
|
||||
);
|
||||
}
|
||||
} else if ($event_rep === EVENT_GROUP_REP_EXTRAIDS) {
|
||||
} else if ($group_rep === EVENT_GROUP_REP_EXTRAIDS) {
|
||||
$whereGrouped = sprintf(
|
||||
'`id_extra` = "%s"',
|
||||
$event['id_extra']
|
||||
@ -1647,6 +1650,7 @@ if ($get_extended_event) {
|
||||
$comments = $event['comments'];
|
||||
|
||||
$event['similar_ids'] = $similar_ids;
|
||||
$event['group_rep'] = $group_rep;
|
||||
|
||||
if (isset($comments) === false) {
|
||||
$comments = $event['user_comment'];
|
||||
|
@ -258,6 +258,14 @@ class ConsoleSupervisor
|
||||
$this->checkSyncQueueStatus();
|
||||
}
|
||||
|
||||
/*
|
||||
* Checkc agent missing libraries.
|
||||
* NOTIF.AGENT.LIBRARY
|
||||
*/
|
||||
if ((bool) enterprise_installed() === true) {
|
||||
$this->checkLibaryError();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -518,6 +526,14 @@ class ConsoleSupervisor
|
||||
$this->checkSyncQueueLength();
|
||||
$this->checkSyncQueueStatus();
|
||||
}
|
||||
|
||||
/*
|
||||
* Checkc agent missing libraries.
|
||||
* NOTIF.AGENT.LIBRARY
|
||||
*/
|
||||
if ((bool) enterprise_installed() === true) {
|
||||
$this->checkLibaryError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2379,7 +2395,7 @@ class ConsoleSupervisor
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
|
||||
$message_conf_cron .= __('Discovery relies on an appropriate cron setup.');
|
||||
$message_conf_cron .= '. '.__('Please, add the following line to your crontab file:');
|
||||
$message_conf_cron .= '<b><pre class=""ui-dialog>* * * * * <user> wget -q -O - --no-check-certificate ';
|
||||
$message_conf_cron .= '<b><pre class=""ui-dialog>* * * * * <user> wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies ';
|
||||
$message_conf_cron .= str_replace(
|
||||
ENTERPRISE_DIR.'/meta/',
|
||||
'',
|
||||
@ -2806,4 +2822,30 @@ class ConsoleSupervisor
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Chechs if an agent has a dependency eror on omnishell
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function checkLibaryError()
|
||||
{
|
||||
$sql = 'SELECT COUNT(errorlevel) from tremote_command_target WHERE errorlevel = 2';
|
||||
|
||||
$error_dependecies = db_get_sql($sql);
|
||||
if ($error_dependecies > 0) {
|
||||
$this->notify(
|
||||
[
|
||||
'type' => 'NOTIF.AGENT.LIBRARY',
|
||||
'title' => __('Agent dependency error'),
|
||||
'message' => __(
|
||||
'There are omnishell agents with dependency errors',
|
||||
),
|
||||
|
||||
'url' => '__url__/index.php?sec=gextensions&sec2=enterprise/tools/omnishell',
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -104,6 +104,7 @@ class Diagnostics extends Wizard
|
||||
'getChartAjax',
|
||||
'formFeedback',
|
||||
'createdScheduleFeedbackTask',
|
||||
'getSystemDate',
|
||||
];
|
||||
|
||||
|
||||
@ -209,6 +210,7 @@ class Diagnostics extends Wizard
|
||||
'getAttachmentFolder',
|
||||
'getInfoTagenteDatos',
|
||||
'getServerThreads',
|
||||
'getSystemDate',
|
||||
];
|
||||
|
||||
if ($this->pdf === true) {
|
||||
@ -278,6 +280,10 @@ class Diagnostics extends Wizard
|
||||
$title = __('SQL show engine innodb status');
|
||||
break;
|
||||
|
||||
case 'getSystemDate':
|
||||
$title = __('Date system');
|
||||
break;
|
||||
|
||||
default:
|
||||
// Not possible.
|
||||
$title = '';
|
||||
@ -516,6 +522,27 @@ class Diagnostics extends Wizard
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Date system
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSystemDate(): string
|
||||
{
|
||||
$result = [
|
||||
'error' => false,
|
||||
'data' => [
|
||||
'date' => [
|
||||
'name' => __('System Date (Console)'),
|
||||
'value' => date('H:i:s Y-m-d'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Database size stats.
|
||||
*
|
||||
@ -619,7 +646,7 @@ class Diagnostics extends Wizard
|
||||
$currentTime = time();
|
||||
|
||||
$pandoraDbLastRun = __('Pandora DB has never been executed');
|
||||
if ($dateDbMantenaince !== false) {
|
||||
if ($dateDbMantenaince !== false && empty($dateDbMantenaince) === false) {
|
||||
$difference = ($currentTime - $dateDbMantenaince);
|
||||
$pandoraDbLastRun = human_time_description_raw(
|
||||
$difference,
|
||||
|
@ -782,7 +782,9 @@ class NetworkMap
|
||||
if ($this->network) {
|
||||
// Network map, based on direct network.
|
||||
$nodes = networkmap_get_nodes_from_ip_mask(
|
||||
$this->network
|
||||
$this->network,
|
||||
false,
|
||||
'
'
|
||||
);
|
||||
} else if ($this->mapOptions['map_filter']['empty_map']) {
|
||||
// Empty map returns no data.
|
||||
@ -792,17 +794,22 @@ class NetworkMap
|
||||
|| $this->mapOptions['map_filter']['dont_show_subgroups'] == 1
|
||||
) {
|
||||
// Show only current selected group.
|
||||
$filter['id_grupo'] = $this->idGroup;
|
||||
$filter['id_grupo'] = explode(',', $this->idGroup);
|
||||
} else {
|
||||
// Show current group and children.
|
||||
$childrens = groups_get_children($this->idGroup, null, true);
|
||||
foreach (explode(',', $this->idGroup) as $key => $group) {
|
||||
$childrens = groups_get_children($group, null, true);
|
||||
if (!empty($childrens)) {
|
||||
$childrens = array_keys($childrens);
|
||||
|
||||
$filter['id_grupo'] = $childrens;
|
||||
$filter['id_grupo'][] = $this->idGroup;
|
||||
if (empty($filter['id_grupo']) === false) {
|
||||
$filter['id_grupo'] = array_merge($filter['id_grupo'], $childrens);
|
||||
} else {
|
||||
$filter['id_grupo'] = $this->idGroup;
|
||||
$filter['id_grupo'] = $childrens;
|
||||
}
|
||||
} else {
|
||||
$filter['id_grupo'][] = $group;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1189,6 +1196,10 @@ class NetworkMap
|
||||
$head .= 'overlap="scalexy";';
|
||||
}
|
||||
|
||||
if ($layout == 'spring1' || $layout == 'spring2') {
|
||||
$head .= 'sep="'.$node_sep.'";';
|
||||
}
|
||||
|
||||
if ($layout == 'flat') {
|
||||
$head .= 'ranksep="'.$rank_sep.'";';
|
||||
}
|
||||
@ -3498,6 +3509,7 @@ class NetworkMap
|
||||
url_background_grid: url_background_grid,
|
||||
refresh_time: '.$this->mapOptions['refresh_time'].',
|
||||
font_size: '.$this->mapOptions['font_size'].',
|
||||
method: '.$this->map['generation_method'].',
|
||||
base_url_homedir: "'.ui_get_full_url(false).'"
|
||||
});
|
||||
init_drag_and_drop();
|
||||
|
@ -416,8 +416,8 @@ class SnmpConsole extends HTML
|
||||
'label' => __('Alert'),
|
||||
'type' => 'select',
|
||||
'id' => 'filter_alert',
|
||||
'input_class' => 'filter_input_datatable',
|
||||
'name' => 'filter_alert',
|
||||
'class' => 'w200px',
|
||||
'fields' => $show_alerts,
|
||||
'return' => true,
|
||||
'selected' => $this->filter_alert,
|
||||
@ -426,8 +426,8 @@ class SnmpConsole extends HTML
|
||||
'label' => __('Severity'),
|
||||
'type' => 'select',
|
||||
'id' => 'filter_severity',
|
||||
'input_class' => 'filter_input_datatable',
|
||||
'name' => 'filter_severity',
|
||||
'class' => 'w200px',
|
||||
'fields' => $severities,
|
||||
'return' => true,
|
||||
'selected' => $this->filter_severity,
|
||||
@ -435,8 +435,8 @@ class SnmpConsole extends HTML
|
||||
[
|
||||
'label' => __('Free search'),
|
||||
'type' => 'text',
|
||||
'class' => 'w400px',
|
||||
'id' => 'filter_free_search',
|
||||
'input_class' => 'filter_input_datatable',
|
||||
'name' => 'filter_free_search',
|
||||
'value' => $this->filter_free_search,
|
||||
],
|
||||
@ -444,8 +444,8 @@ class SnmpConsole extends HTML
|
||||
'label' => __('Status'),
|
||||
'type' => 'select',
|
||||
'id' => 'filter_status',
|
||||
'input_class' => 'filter_input_datatable',
|
||||
'name' => 'filter_status',
|
||||
'class' => 'w200px',
|
||||
'fields' => $status_array,
|
||||
'return' => true,
|
||||
'selected' => $this->filter_status,
|
||||
@ -458,6 +458,7 @@ class SnmpConsole extends HTML
|
||||
'disabled' => false,
|
||||
'return' => true,
|
||||
'id' => 'filter_group_by',
|
||||
'input_class' => 'filter_input_datatable',
|
||||
'fields' => [
|
||||
0 => __('No'),
|
||||
1 => __('Yes'),
|
||||
@ -466,8 +467,8 @@ class SnmpConsole extends HTML
|
||||
[
|
||||
'label' => __('Max. hours old'),
|
||||
'type' => 'text',
|
||||
'class' => 'w200px',
|
||||
'id' => 'filter_hours_ago',
|
||||
'input_class' => 'filter_input_datatable',
|
||||
'name' => 'filter_hours_ago',
|
||||
'value' => $this->filter_hours_ago,
|
||||
],
|
||||
@ -475,8 +476,8 @@ class SnmpConsole extends HTML
|
||||
'label' => __('Trap type'),
|
||||
'type' => 'select',
|
||||
'id' => 'filter_trap_type',
|
||||
'input_class' => 'filter_input_datatable',
|
||||
'name' => 'filter_trap_type',
|
||||
'class' => 'w200px',
|
||||
'fields' => $trap_types,
|
||||
'return' => true,
|
||||
'selected' => $this->filter_trap_type,
|
||||
|
@ -20,8 +20,8 @@
|
||||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC230210';
|
||||
$pandora_version = 'v7.0NG.768';
|
||||
$build_version = 'PC230222';
|
||||
$pandora_version = 'v7.0NG.769';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
$script_tz = @date_default_timezone_get();
|
||||
|
@ -463,10 +463,6 @@ function config_update_config()
|
||||
if (config_update_value('ipam_ocuppied_warning_treshold', get_parameter('ipam_ocuppied_warning_treshold'), true) === false) {
|
||||
$error_update[] = __('Ipam Ocuppied Manager Warning');
|
||||
}
|
||||
|
||||
if (config_update_value('sap_license', get_parameter('sap_license'), true) === false) {
|
||||
$error_update[] = __('SAP/R3 Plugin Licence');
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Images File Manager functions.
|
||||
*
|
||||
@ -96,7 +97,7 @@ function upload_file($upload_file_or_zip, $default_real_directory, $destination_
|
||||
|
||||
check_login();
|
||||
|
||||
if (! check_acl($config['id_user'], 0, 'AW')) {
|
||||
if (!check_acl($config['id_user'], 0, 'AW')) {
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to access File manager'
|
||||
@ -139,25 +140,8 @@ function upload_file($upload_file_or_zip, $default_real_directory, $destination_
|
||||
$nombre_archivo = sprintf('%s/%s', $real_directory, $filename);
|
||||
try {
|
||||
$mimeContentType = mime_content_type($_FILES['file']['tmp_name']);
|
||||
$fileExtension = pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION);
|
||||
|
||||
$validFileExtension = true;
|
||||
|
||||
if (empty($fileExtension) === false) {
|
||||
$filtered_types = array_filter(
|
||||
$filterFilesType,
|
||||
function ($value) use ($fileExtension) {
|
||||
$mimeTypeExtensionName = explode('/', $value)[1];
|
||||
return $mimeTypeExtensionName === $fileExtension;
|
||||
}
|
||||
);
|
||||
|
||||
if (empty($filtered_types) === true) {
|
||||
$validFileExtension = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($validFileExtension === true && (empty($filterFilesType) === true || in_array($mimeContentType, $filterFilesType) === true)) {
|
||||
if (empty($filterFilesType) === true || in_array($mimeContentType, $filterFilesType) === true) {
|
||||
$result = copy($_FILES['file']['tmp_name'], $nombre_archivo);
|
||||
} else {
|
||||
$error_message = 'The uploaded file is not allowed. Only gif, png or jpg files can be uploaded.';
|
||||
@ -240,7 +224,7 @@ function create_text_file($default_real_directory, $destination_directory)
|
||||
|
||||
check_login();
|
||||
|
||||
if (! check_acl($config['id_user'], 0, 'AW')) {
|
||||
if (!check_acl($config['id_user'], 0, 'AW')) {
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to access File manager'
|
||||
@ -522,35 +506,36 @@ function filemanager_file_explorer(
|
||||
check_opened_dialog('create_text_file');
|
||||
}
|
||||
<?php endif ?>
|
||||
|
||||
function show_upload_file() {
|
||||
actions_dialog('upload_file');
|
||||
$("#upload_file").css("display", "block");
|
||||
check_opened_dialog('upload_file');
|
||||
}
|
||||
|
||||
function check_opened_dialog(check_opened){
|
||||
if(check_opened !== 'create_folder'){
|
||||
function check_opened_dialog(check_opened) {
|
||||
if (check_opened !== 'create_folder') {
|
||||
if (($("#create_folder").hasClass("ui-dialog-content") && $('#create_folder').dialog('isOpen') === true)) {
|
||||
$('#create_folder').dialog('close');
|
||||
}
|
||||
}
|
||||
<?php if ($allowCreateText === true) : ?>
|
||||
if(check_opened !== 'create_text_file'){
|
||||
if (check_opened !== 'create_text_file') {
|
||||
if (($("#create_text_file").hasClass("ui-dialog-content") && $('#create_text_file').dialog('isOpen') === true)) {
|
||||
$('#create_text_file').dialog('close');
|
||||
}
|
||||
}
|
||||
<?php endif ?>
|
||||
if(check_opened !== 'upload_file'){
|
||||
if (check_opened !== 'upload_file') {
|
||||
if (($("#upload_file").hasClass("ui-dialog-content") && $('#upload_file').dialog('isOpen')) === true) {
|
||||
$('#upload_file').dialog('close');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function actions_dialog(action){
|
||||
$('.'+action).addClass('file_table_modal_active');
|
||||
var title_action ='';
|
||||
function actions_dialog(action) {
|
||||
$('.' + action).addClass('file_table_modal_active');
|
||||
var title_action = '';
|
||||
switch (action) {
|
||||
case 'create_folder':
|
||||
title_action = "<?php echo __('Create a Directory'); ?>";
|
||||
@ -568,7 +553,7 @@ function filemanager_file_explorer(
|
||||
break;
|
||||
}
|
||||
|
||||
$('#'+action)
|
||||
$('#' + action)
|
||||
.dialog({
|
||||
title: title_action,
|
||||
resizable: true,
|
||||
@ -583,11 +568,49 @@ function filemanager_file_explorer(
|
||||
minHeight: 210,
|
||||
maxWidth: 800,
|
||||
maxHeight: 300,
|
||||
close: function () {
|
||||
$('.'+action).removeClass('file_table_modal_active');
|
||||
close: function() {
|
||||
$('.' + action).removeClass('file_table_modal_active');
|
||||
}
|
||||
}).show();
|
||||
}
|
||||
|
||||
function show_modal_real_path(path) {
|
||||
if (navigator.clipboard && window.isSecureContext) <?php $secure_con = true; ?>;
|
||||
else <?php $secure_con = false; ?>;
|
||||
$('#modal_real_path').addClass('file_table_modal_active');
|
||||
$('#real_path').empty();
|
||||
$('#real_path').html(path);
|
||||
title_action = "<?php echo __('Real path'); ?>";
|
||||
$('#modal_real_path')
|
||||
.dialog({
|
||||
title: title_action,
|
||||
resizable: true,
|
||||
draggable: true,
|
||||
modal: true,
|
||||
overlay: {
|
||||
opacity: 0.5,
|
||||
background: "black"
|
||||
},
|
||||
width: 448,
|
||||
minWidth: 448,
|
||||
minHeight: 213,
|
||||
maxWidth: 800,
|
||||
maxHeight: 300,
|
||||
close: function() {
|
||||
$('#modal_real_path').removeClass('file_table_modal_active');
|
||||
}
|
||||
}).show();
|
||||
|
||||
$("#submit-submit").on("click", copyToClipboard);
|
||||
}
|
||||
|
||||
function copyToClipboard() {
|
||||
if (navigator.clipboard && window.isSecureContext) {
|
||||
window.navigator.clipboard.writeText($("#real_path").text()).then(function() {
|
||||
$('#modal_real_path').dialog('close');
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
// List files.
|
||||
@ -764,6 +787,13 @@ function filemanager_file_explorer(
|
||||
$data[4] .= '</a>';
|
||||
}
|
||||
|
||||
if (is_writable($fileinfo['realpath']) === true
|
||||
&& (is_dir($fileinfo['realpath']) === false || count(scandir($fileinfo['realpath'])) < 3)
|
||||
&& ($readOnly === false)
|
||||
) {
|
||||
$data[4] .= '<a href="javascript: show_modal_real_path(`'.$fileinfo['realpath'].'`);">'.html_print_image('images/book_edit.png', true, ['style' => 'margin-top: 2px;', 'title' => __('Real path'), 'class' => 'invert_filter']).'</a>';
|
||||
}
|
||||
|
||||
$data[4] .= '</span>';
|
||||
|
||||
array_push($table->data, $data);
|
||||
@ -859,7 +889,7 @@ function filemanager_file_explorer(
|
||||
'content' => html_print_input_file(
|
||||
'file',
|
||||
true,
|
||||
[ 'style' => 'border:0; padding:0; width:100%' ]
|
||||
['style' => 'border:0; padding:0; width:100%']
|
||||
),
|
||||
],
|
||||
true
|
||||
@ -942,6 +972,22 @@ function filemanager_file_explorer(
|
||||
);
|
||||
echo '</a>';
|
||||
|
||||
// Show Modal Real Path
|
||||
$modal_real_path = "<div><b>Real path to plugin execution is:</b></div>
|
||||
<div id='real_path'></div>";
|
||||
|
||||
if (isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'on' || $_SERVER['SERVER_NAME'] == 'localhost' || $_SERVER['SERVER_NAME'] == '127.0.0.1') {
|
||||
$modal_real_path .= "<div style='float:right;margin: 5em 0 0 auto';>".html_print_submit_button(__('Copy'), 'submit', false, 'class="sub next"', true).'</div>';
|
||||
}
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'modal_real_path',
|
||||
'class' => 'invisible',
|
||||
'content' => $modal_real_path,
|
||||
]
|
||||
);
|
||||
|
||||
echo '</div>';
|
||||
} else {
|
||||
echo "<div style='text-align: right; width: ".$table->width."; color:#AC4444; margin-bottom:10px;'>";
|
||||
|
@ -837,6 +837,7 @@ if (is_ajax()) {
|
||||
$db_fragmentation = json_decode($d->getTablesFragmentation());
|
||||
$sys_info = json_decode($d->getSystemInfo());
|
||||
$php_sys = json_decode($d->getPHPSetup());
|
||||
$system_date = json_decode($d->getSystemDate());
|
||||
|
||||
$fragmentation_status = '';
|
||||
if ($db_fragmentation->data->tablesFragmentationStatus->status === 1) {
|
||||
@ -1098,6 +1099,14 @@ if (is_ajax()) {
|
||||
<p>'.$sys_info->data->ipInfo->value.'</p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 15%;">
|
||||
<p><span>'.$system_date->data->date->name.'</span></p>
|
||||
</th>
|
||||
<th style="width: 85%;">
|
||||
<p>'.$system_date->data->date->value.'</p>
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -519,12 +519,13 @@ function modules_delete_agent_module($id_agent_module)
|
||||
'disabled' => 1,
|
||||
'delete_pending' => 1,
|
||||
];
|
||||
$result = db_process_sql_update(
|
||||
$id_agent = db_process_sql_update(
|
||||
'tagente_modulo',
|
||||
$values,
|
||||
['id_agente_modulo' => $id_borrar_modulo]
|
||||
);
|
||||
if ($result === false) {
|
||||
|
||||
if ($id_agent === false) {
|
||||
$error++;
|
||||
} else {
|
||||
// Set flag to update module status count.
|
||||
@ -562,7 +563,7 @@ function modules_delete_agent_module($id_agent_module)
|
||||
$result = db_process_delete_temp(
|
||||
'ttag_module',
|
||||
'id_agente_modulo',
|
||||
$id_borrar_modulo
|
||||
$id_agent
|
||||
);
|
||||
if ($result === false) {
|
||||
$error++;
|
||||
|
@ -1126,6 +1126,10 @@ function networkmap_open_graph(
|
||||
$head .= 'overlap="scalexy";';
|
||||
}
|
||||
|
||||
if ($layout == 'spring1' || $layout == 'spring2') {
|
||||
$head .= 'sep="'.$node_sep.'";';
|
||||
}
|
||||
|
||||
if ($layout === 'flat') {
|
||||
$head .= 'ranksep="'.$rank_sep.'";';
|
||||
} else if ($layout === 'spring2') {
|
||||
@ -1356,9 +1360,10 @@ function networkmap_get_types($strict_user=false)
|
||||
*/
|
||||
function networkmap_get_nodes_from_ip_mask(
|
||||
$ip_mask,
|
||||
$return_ids_only=false
|
||||
$return_ids_only=false,
|
||||
$separator=',',
|
||||
) {
|
||||
$list_ip_masks = explode(',', $ip_mask);
|
||||
$list_ip_masks = explode($separator, $ip_mask);
|
||||
|
||||
if (empty($list_ip_masks) === true) {
|
||||
return [];
|
||||
|
@ -55,10 +55,30 @@ function draw_minimap() {
|
||||
var relation_min_nodes = minimap_relation;
|
||||
var relation_minimap_w = 2;
|
||||
var relation_minimap_h = 2;
|
||||
if (graph.nodes.length > 100) {
|
||||
if (graph.nodes.length > 100 && graph.nodes.length < 500) {
|
||||
relation_min_nodes = 0.01;
|
||||
relation_minimap_w = (graph.nodes.length / 100) * 2.5;
|
||||
relation_minimap_h = 1.5;
|
||||
} else if (graph.nodes.length >= 500 && graph.nodes.length < 1000) {
|
||||
if (typeof method != "undefined" && method == 4) {
|
||||
relation_min_nodes = 0.002;
|
||||
relation_minimap_w = (graph.nodes.length / 500) * 2.5;
|
||||
relation_minimap_h = 3;
|
||||
} else {
|
||||
relation_min_nodes = 0.008;
|
||||
relation_minimap_w = (graph.nodes.length / 500) * 2.5;
|
||||
relation_minimap_h = 3;
|
||||
}
|
||||
} else if (graph.nodes.length >= 1000) {
|
||||
if (typeof method != "undefined" && method == 4) {
|
||||
relation_min_nodes = 0.001;
|
||||
relation_minimap_w = (graph.nodes.length / 1000) * 4.5;
|
||||
relation_minimap_h = 4;
|
||||
} else {
|
||||
relation_min_nodes = 0.0015;
|
||||
relation_minimap_w = (graph.nodes.length / 1000) * 3.5;
|
||||
relation_minimap_h = 3.5;
|
||||
}
|
||||
}
|
||||
|
||||
//Draw the items and lines
|
||||
@ -1792,10 +1812,30 @@ function init_minimap() {
|
||||
var relation_minimap_w = 2;
|
||||
var relation_minimap_h = 2;
|
||||
|
||||
if (graph.nodes.length > 100) {
|
||||
if (graph.nodes.length > 100 && graph.nodes.length < 500) {
|
||||
relation_min_nodes = 0.01;
|
||||
relation_minimap_w = (graph.nodes.length / 100) * 2.5;
|
||||
relation_minimap_h = 1.5;
|
||||
} else if (graph.nodes.length >= 500 && graph.nodes.length < 1000) {
|
||||
if (typeof method != "undefined" && method == 4) {
|
||||
relation_min_nodes = 0.002;
|
||||
relation_minimap_w = (graph.nodes.length / 500) * 2.5;
|
||||
relation_minimap_h = 3;
|
||||
} else {
|
||||
relation_min_nodes = 0.008;
|
||||
relation_minimap_w = (graph.nodes.length / 500) * 2.5;
|
||||
relation_minimap_h = 3;
|
||||
}
|
||||
} else if (graph.nodes.length >= 1000) {
|
||||
if (typeof method != "undefined" && method == 4) {
|
||||
relation_min_nodes = 0.001;
|
||||
relation_minimap_w = (graph.nodes.length / 1000) * 4.5;
|
||||
relation_minimap_h = 4;
|
||||
} else {
|
||||
relation_min_nodes = 0.0015;
|
||||
relation_minimap_w = (graph.nodes.length / 1000) * 3.5;
|
||||
relation_minimap_h = 3.5;
|
||||
}
|
||||
}
|
||||
|
||||
$("#minimap_" + networkmap_id).bind("mousemove", function(event) {
|
||||
@ -3092,6 +3132,10 @@ function init_graph(parameter_object) {
|
||||
window.refresh_time = parameter_object.refresh_time;
|
||||
}
|
||||
|
||||
if (typeof parameter_object.method != "undefined") {
|
||||
window.method = parameter_object.method;
|
||||
}
|
||||
|
||||
var rect_center_x = graph.nodes[0].x;
|
||||
var rect_center_y = graph.nodes[0].y;
|
||||
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -405,6 +405,27 @@ a.pandora_pagination.current:hover {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.filter_input_datatable {
|
||||
width: 45% !important;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: row;
|
||||
max-width: 450px;
|
||||
min-width: 400px;
|
||||
}
|
||||
.filter_input_datatable input {
|
||||
flex: 1;
|
||||
}
|
||||
.filter_input_datatable label {
|
||||
width: 93px;
|
||||
max-width: 100%;
|
||||
}
|
||||
.filter_input_datatable .select2.select2-container {
|
||||
flex: 1;
|
||||
}
|
||||
.datatable_filter.content li.filter_input_datatable {
|
||||
margin: 1em 0;
|
||||
}
|
||||
/* Default datatable filter style */
|
||||
.datatable_filter.content {
|
||||
display: flex;
|
||||
@ -419,6 +440,7 @@ a.pandora_pagination.current:hover {
|
||||
.datatable_filter.content li {
|
||||
flex: 1 1 auto;
|
||||
margin: 1em auto;
|
||||
padding: 0px 10px;
|
||||
}
|
||||
.sorting_desc {
|
||||
background: url(../../images/sort_down_green.png) no-repeat;
|
||||
|
@ -1054,6 +1054,7 @@ if (isset($_GET['bye'])) {
|
||||
header_remove('Set-Cookie');
|
||||
setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/');
|
||||
|
||||
generate_csrf_code();
|
||||
// Process logout.
|
||||
include 'general/logoff.php';
|
||||
|
||||
|
@ -130,8 +130,8 @@
|
||||
</div>
|
||||
<div style='padding-bottom: 50px'>
|
||||
<?php
|
||||
$version = '7.0NG.768';
|
||||
$build = '230210';
|
||||
$version = '7.0NG.769';
|
||||
$build = '230222';
|
||||
$banner = "v$version Build $build";
|
||||
error_reporting(0);
|
||||
|
||||
|
@ -57,10 +57,10 @@ if ($new_networkmap) {
|
||||
$offset_x = '';
|
||||
$offset_y = '';
|
||||
$scale_z = 0.5;
|
||||
$node_sep = 10;
|
||||
$rank_sep = 1.0;
|
||||
$node_sep = 0.25;
|
||||
$rank_sep = 0.5;
|
||||
$mindist = 1.0;
|
||||
$kval = 5;
|
||||
$kval = 0.3;
|
||||
$refresh_time = 300;
|
||||
}
|
||||
|
||||
@ -273,6 +273,25 @@ if (!empty($result)) {
|
||||
if ($not_found) {
|
||||
ui_print_error_message(__('Not found networkmap.'));
|
||||
} else {
|
||||
if ($disabled_source === false) {
|
||||
echo '<div id="map_loading" style="width: 98%;height: 1000px; background-color: rgba(245, 245, 245, .3);position: absolute;display: flex;justify-content: center;align-items: center;flex-direction: column-reverse;">';
|
||||
echo html_print_image('images/spinner.gif', true, 'width: 50px;height: 50px;');
|
||||
echo '<div>'.__('Creating map...').'</div>';
|
||||
echo '</div>';
|
||||
$info1 = __('To create a network map that visually recreates link-level (L2) relationships, you must first discover these relationships with Discovery Server. Network maps only reflect relationships that have already been discovered.');
|
||||
$separator = '<br>';
|
||||
$info2 = __('Discovery Server discovers relationships between interfaces (L2) through SNMP and relationships between hosts (L3) through route discovery.');
|
||||
$info3 = __('You can also create these relationships manually by editing nodes or re-passing a discovery task after adding new information (for example by adding new SNMP communities).');
|
||||
$info4 = __('See our documentation for more information.');
|
||||
ui_print_info_message(
|
||||
[
|
||||
'no_close' => false,
|
||||
'message' => $info1.$separator.$info2.$separator.$info3.$separator.$info4,
|
||||
],
|
||||
'style="width: 98%;"'
|
||||
);
|
||||
}
|
||||
|
||||
$table = new stdClass();
|
||||
$table->id = 'form_editor';
|
||||
|
||||
@ -337,7 +356,14 @@ if ($not_found) {
|
||||
);
|
||||
|
||||
$table->data[3][0] = __('Description');
|
||||
$table->data[3][1] = html_print_textarea('description', 7, 25, $description, '', true);
|
||||
$table->data[3][1] = html_print_input_text(
|
||||
'description',
|
||||
$description,
|
||||
'',
|
||||
100,
|
||||
100,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[4][0] = __('Position X');
|
||||
$table->data[4][1] = html_print_input_text('pos_x', $offset_x, '', 2, 10, true);
|
||||
@ -352,7 +378,23 @@ if ($not_found) {
|
||||
$table->data[6][1] = html_print_input_text('scale_z', $scale_z, '', 2, 10, true).ui_print_help_tip(__('Introduce zoom level. 1 = Highest resolution. Figures may include decimals'), true);
|
||||
|
||||
$table->data['source'][0] = __('Source');
|
||||
$table->data['source'][1] = html_print_radio_button('source', 'group', __('Group'), $source, true, $disabled_source).html_print_radio_button('source', 'recon_task', __('Discovery task'), $source, true, $disabled_source).html_print_radio_button('source', 'ip_mask', __('CIDR IP mask'), $source, true, $disabled_source);
|
||||
$table->data['source'][1] = html_print_select(
|
||||
[
|
||||
'group' => __('Group'),
|
||||
'recon_task' => __('Discovery task'),
|
||||
'ip_mask' => __('CIDR IP mask'),
|
||||
],
|
||||
'source',
|
||||
$source,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
$disabled_source
|
||||
);
|
||||
|
||||
$table->data['source_data_recon_task'][0] = __('Source from recon task');
|
||||
$table->data['source_data_recon_task'][0] .= ui_print_help_tip(
|
||||
@ -378,18 +420,28 @@ if ($not_found) {
|
||||
);
|
||||
|
||||
$table->data['source_data_ip_mask'][0] = __('Source from CIDR IP mask');
|
||||
$table->data['source_data_ip_mask'][1] = html_print_input_text('ip_mask', $ip_mask, '', 20, 255, true, $disabled_source);
|
||||
$table->data['source_data_ip_mask'][1] = html_print_textarea(
|
||||
'ip_mask',
|
||||
3,
|
||||
5,
|
||||
$ip_mask,
|
||||
'style="width: 238px"',
|
||||
true,
|
||||
'',
|
||||
$disabled_source
|
||||
);
|
||||
|
||||
$table->data['source_data_group'][0] = __('Source group');
|
||||
$table->data['source_data_group'][1] = '<div class="w250px">'.html_print_select_groups(
|
||||
$config['id_user'],
|
||||
'AR',
|
||||
true,
|
||||
'id_group',
|
||||
$id_group,
|
||||
'id_group[]',
|
||||
explode(',', $id_group),
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
true
|
||||
).'</div>';
|
||||
$table->data['source_data_group'][1] .= html_print_image(
|
||||
@ -498,8 +550,9 @@ if ($not_found) {
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$("input[name='source']").on('change', function() {
|
||||
var source = $("input[name='source']:checked").val();
|
||||
$("#map_loading").hide();
|
||||
$("#source").change(function() {
|
||||
const source = $(this).val();
|
||||
|
||||
if (source == 'recon_task') {
|
||||
$("#form_editor-source_data_ip_mask")
|
||||
@ -510,7 +563,6 @@ $(document).ready(function() {
|
||||
.css('display', 'none');
|
||||
$("#form_editor-source_data_recon_task")
|
||||
.css('display', '');
|
||||
|
||||
}
|
||||
else if (source == 'ip_mask') {
|
||||
$("#form_editor-source_data_ip_mask")
|
||||
@ -565,7 +617,7 @@ $(document).ready(function() {
|
||||
$("#form_editor-kval")
|
||||
.css('display', 'none');
|
||||
$("#form_editor-nodesep")
|
||||
.css('display', '');
|
||||
.css('display', 'none');
|
||||
}
|
||||
else if (method == 'neato') {
|
||||
$("#form_editor-ranksep")
|
||||
@ -599,16 +651,14 @@ $(document).ready(function() {
|
||||
}
|
||||
});
|
||||
|
||||
$("input[name='source']").trigger("change");
|
||||
$("#source").trigger("change");
|
||||
$("#method").trigger("change");
|
||||
|
||||
|
||||
// Control if id_group has changed.
|
||||
var id_group_old = $("#id_group").val();
|
||||
var id_group_changed = false;
|
||||
|
||||
$("#id_group").on('change',{id_group_old: id_group_old}, function () {
|
||||
|
||||
var id_group_new = $("#id_group").val();
|
||||
if((id_group_old != id_group_new) && (update_networkmap == 1 )) {
|
||||
id_group_changed = true;
|
||||
@ -625,7 +675,7 @@ $(document).ready(function() {
|
||||
update_networkmap = $("input[name='update_networkmap']").val();
|
||||
|
||||
$( "#submit-crt" ).click(function( event ) {
|
||||
|
||||
$("#map_loading").show();
|
||||
if(update_networkmap == 1 && id_group_changed === true) {
|
||||
confirmDialog({
|
||||
title: '<?php echo __('Are you sure?'); ?>',
|
||||
@ -643,7 +693,6 @@ $(document).ready(function() {
|
||||
})
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("#refresh_time_units").trigger("change");
|
||||
|
@ -182,7 +182,7 @@ if ($save_empty_networkmap === true) {
|
||||
|
||||
$values = [];
|
||||
$values['name'] = $name;
|
||||
$values['id_group'] = $id_group;
|
||||
$values['id_group'] = implode(',', $id_group);
|
||||
|
||||
$values['generation_method'] = 4;
|
||||
|
||||
@ -237,7 +237,7 @@ if ($new_networkmap || $save_networkmap) {
|
||||
}
|
||||
|
||||
if ($save_networkmap) {
|
||||
$id_group = (int) get_parameter('id_group', 0);
|
||||
$id_group = get_parameter('id_group', 0);
|
||||
$id_group_map = (int) get_parameter('id_group_map', 0);
|
||||
|
||||
|
||||
@ -292,7 +292,7 @@ if ($new_networkmap || $save_networkmap) {
|
||||
|
||||
$values = [];
|
||||
$values['name'] = $name;
|
||||
$values['id_group'] = $id_group;
|
||||
$values['id_group'] = implode(',', $id_group);
|
||||
$values['source_period'] = 60;
|
||||
$values['width'] = $width;
|
||||
$values['height'] = $height;
|
||||
@ -333,7 +333,7 @@ if ($new_networkmap || $save_networkmap) {
|
||||
|
||||
if ($source == 'group') {
|
||||
$values['source'] = 0;
|
||||
$values['source_data'] = $id_group;
|
||||
$values['source_data'] = implode(',', $id_group);
|
||||
} else if ($source == 'recon_task') {
|
||||
$values['source'] = 1;
|
||||
$values['source_data'] = $recon_task_id;
|
||||
@ -444,7 +444,7 @@ else if ($update_networkmap || $copy_networkmap || $delete) {
|
||||
}
|
||||
|
||||
if ($update_networkmap) {
|
||||
$id_group = (int) get_parameter('id_group', 0);
|
||||
$id_group = get_parameter('id_group', 0);
|
||||
// Get id of old group source to check changes.
|
||||
$id_group_old = db_get_value('id_group', 'tmap', 'id', $id);
|
||||
|
||||
@ -480,7 +480,7 @@ else if ($update_networkmap || $copy_networkmap || $delete) {
|
||||
|
||||
$values = [];
|
||||
$values['name'] = $name;
|
||||
$values['id_group'] = $id_group;
|
||||
$values['id_group'] = implode(',', $id_group);
|
||||
$values['id_group_map'] = $id_group_map;
|
||||
|
||||
$description = get_parameter('description', '');
|
||||
|
@ -171,7 +171,23 @@ if (is_ajax() === true) {
|
||||
$table->data[6][1] = html_print_input_text('scale_z', $map_filter['z_dash'], '', 2, 10, true).ui_print_help_tip(__('Introduce zoom level. 1 = Highest resolution. Figures may include decimals'), true);
|
||||
|
||||
$table->data['source'][0] = __('Source');
|
||||
$table->data['source'][1] = html_print_radio_button('source', 'group', __('Group'), $source, true).html_print_radio_button('source', 'recon_task', __('Discovery task'), $source, true).html_print_radio_button('source', 'ip_mask', __('CIDR IP mask'), $source, true);
|
||||
$table->data['source'][1] = html_print_select(
|
||||
[
|
||||
'group' => __('Group'),
|
||||
'recon_task' => __('Discovery task'),
|
||||
'ip_mask' => __('CIDR IP mask'),
|
||||
],
|
||||
'source',
|
||||
$source,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
$disabled_source
|
||||
);
|
||||
|
||||
if (! check_acl($config['id_user'], 0, 'PM')) {
|
||||
$sql = sprintf(
|
||||
@ -221,7 +237,16 @@ if (is_ajax() === true) {
|
||||
);
|
||||
|
||||
$table->data['source_data_ip_mask'][0] = __('Source from CIDR IP mask');
|
||||
$table->data['source_data_ip_mask'][1] = html_print_input_text('ip_mask', $map_info['source_data'], '', 20, 255, true);
|
||||
$table->data['source_data_ip_mask'][1] = html_print_textarea(
|
||||
'ip_mask',
|
||||
3,
|
||||
5,
|
||||
$map_info['source_data'],
|
||||
'',
|
||||
true,
|
||||
'',
|
||||
$disabled_source
|
||||
);
|
||||
|
||||
$dont_show_subgroups = 0;
|
||||
if (isset($map_filter['dont_show_subgroups'])) {
|
||||
@ -296,8 +321,8 @@ if (is_ajax() === true) {
|
||||
$map_form .= html_print_table($table, true);
|
||||
|
||||
$map_form .= '<script>
|
||||
$("input[name=\'source\']").on(\'change\', function() {
|
||||
var source = $("input[name=\'source\']:checked").val();
|
||||
$("#source").change(function() {
|
||||
const source = $(this).val();
|
||||
|
||||
if (source == \'recon_task\') {
|
||||
$("#form_editor-source_data_ip_mask")
|
||||
@ -389,7 +414,7 @@ if (is_ajax() === true) {
|
||||
}
|
||||
});
|
||||
|
||||
$("input[name=\'source\']").trigger("change");
|
||||
$("#source").trigger("change");
|
||||
$("#method").trigger("change");
|
||||
</script>';
|
||||
|
||||
|
@ -162,7 +162,7 @@ $autosearch = false;
|
||||
// It is validated if it receives parameters different from those it has by default.
|
||||
if ($ag_freestring !== '' || $moduletype !== '' || $datatype !== ''
|
||||
|| $ag_modulename !== '' || $refr !== 0 || $offset !== 0 || $status !== 4
|
||||
|| $modulegroup !== -1 || $tag_filter !== 0 || $sortField !== ''
|
||||
|| $modulegroup !== -1 || (bool) array_filter($tag_filter) !== false || $sortField !== ''
|
||||
|| $sort !== 'none' || $id_module !== 0 || $module_option !== 1
|
||||
|| $min_hours_status !== ''
|
||||
) {
|
||||
|
@ -239,6 +239,13 @@ $server_id = get_parameter(
|
||||
($filter['server_id'] ?? '')
|
||||
);
|
||||
|
||||
if (empty($id_agent) === true) {
|
||||
$id_agent = get_parameter(
|
||||
'id_agent',
|
||||
($filter['id_agent'] ?? '')
|
||||
);
|
||||
}
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
$servers = metaconsole_get_servers();
|
||||
if (is_array($servers) === true) {
|
||||
@ -574,37 +581,37 @@ if (is_ajax() === true) {
|
||||
|
||||
// Event severity prepared.
|
||||
switch ($tmp->criticity) {
|
||||
case EVENT_CRIT_CRITICAL;
|
||||
case EVENT_CRIT_CRITICAL:
|
||||
$text = __('CRITICAL');
|
||||
$color = COL_CRITICAL;
|
||||
break;
|
||||
|
||||
case EVENT_CRIT_MAINTENANCE;
|
||||
case EVENT_CRIT_MAINTENANCE:
|
||||
$text = __('MAINTENANCE');
|
||||
$color = COL_MAINTENANCE;
|
||||
break;
|
||||
|
||||
case EVENT_CRIT_INFORMATIONAL;
|
||||
case EVENT_CRIT_INFORMATIONAL:
|
||||
$text = __('INFORMATIONAL');
|
||||
$color = COL_INFORMATIONAL;
|
||||
break;
|
||||
|
||||
case EVENT_CRIT_MAJOR;
|
||||
case EVENT_CRIT_MAJOR:
|
||||
$text = __('MAJOR');
|
||||
$color = COL_MAJOR;
|
||||
break;
|
||||
|
||||
case EVENT_CRIT_MINOR;
|
||||
case EVENT_CRIT_MINOR:
|
||||
$text = __('MINOR');
|
||||
$color = COL_MINOR;
|
||||
break;
|
||||
|
||||
case EVENT_CRIT_NORMAL;
|
||||
case EVENT_CRIT_NORMAL:
|
||||
$text = __('NORMAL');
|
||||
$color = COL_NORMAL;
|
||||
break;
|
||||
|
||||
case EVENT_CRIT_WARNING;
|
||||
case EVENT_CRIT_WARNING:
|
||||
$text = __('WARNING');
|
||||
$color = COL_WARNING;
|
||||
break;
|
||||
@ -652,43 +659,43 @@ if (is_ajax() === true) {
|
||||
|
||||
// Event type prepared.
|
||||
switch ($tmp->event_type) {
|
||||
case EVENTS_ALERT_FIRED;
|
||||
case EVENTS_ALERT_RECOVERED;
|
||||
case EVENTS_ALERT_CEASED;
|
||||
case EVENTS_ALERT_MANUAL_VALIDATION;
|
||||
case EVENTS_ALERT_FIRED:
|
||||
case EVENTS_ALERT_RECOVERED:
|
||||
case EVENTS_ALERT_CEASED:
|
||||
case EVENTS_ALERT_MANUAL_VALIDATION:
|
||||
$text = __('ALERT');
|
||||
$color = COL_ALERTFIRED;
|
||||
break;
|
||||
|
||||
case EVENTS_RECON_HOST_DETECTED;
|
||||
case EVENTS_SYSTEM;
|
||||
case EVENTS_ERROR;
|
||||
case EVENTS_NEW_AGENT;
|
||||
case EVENTS_CONFIGURATION_CHANGE;
|
||||
case EVENTS_RECON_HOST_DETECTED:
|
||||
case EVENTS_SYSTEM:
|
||||
case EVENTS_ERROR:
|
||||
case EVENTS_NEW_AGENT:
|
||||
case EVENTS_CONFIGURATION_CHANGE:
|
||||
$text = __('SYSTEM');
|
||||
$color = COL_MAINTENANCE;
|
||||
break;
|
||||
|
||||
case EVENTS_GOING_UP_WARNING;
|
||||
case EVENTS_GOING_DOWN_WARNING;
|
||||
case EVENTS_GOING_UP_WARNING:
|
||||
case EVENTS_GOING_DOWN_WARNING:
|
||||
$text = __('WARNING');
|
||||
$color = COL_WARNING;
|
||||
break;
|
||||
|
||||
case EVENTS_GOING_DOWN_NORMAL;
|
||||
case EVENTS_GOING_UP_NORMAL;
|
||||
case EVENTS_GOING_DOWN_NORMAL:
|
||||
case EVENTS_GOING_UP_NORMAL:
|
||||
$text = __('NORMAL');
|
||||
$color = COL_NORMAL;
|
||||
break;
|
||||
|
||||
case EVENTS_GOING_DOWN_CRITICAL;
|
||||
case EVENTS_GOING_UP_CRITICAL;
|
||||
case EVENTS_GOING_DOWN_CRITICAL:
|
||||
case EVENTS_GOING_UP_CRITICAL:
|
||||
$text = __('CRITICAL');
|
||||
$color = COL_CRITICAL;
|
||||
break;
|
||||
|
||||
case EVENTS_UNKNOWN;
|
||||
case EVENTS_GOING_UNKNOWN;
|
||||
case EVENTS_UNKNOWN:
|
||||
case EVENTS_GOING_UNKNOWN:
|
||||
default:
|
||||
$text = __('UNKNOWN');
|
||||
$color = COL_UNKNOWN;
|
||||
@ -702,29 +709,29 @@ if (is_ajax() === true) {
|
||||
// Module status.
|
||||
// Event severity prepared.
|
||||
switch ($tmp->module_status) {
|
||||
case AGENT_MODULE_STATUS_NORMAL;
|
||||
case AGENT_MODULE_STATUS_NORMAL:
|
||||
$text = __('NORMAL');
|
||||
$color = COL_NORMAL;
|
||||
break;
|
||||
|
||||
case AGENT_MODULE_STATUS_CRITICAL_BAD;
|
||||
case AGENT_MODULE_STATUS_CRITICAL_BAD:
|
||||
$text = __('CRITICAL');
|
||||
$color = COL_CRITICAL;
|
||||
break;
|
||||
|
||||
case AGENT_MODULE_STATUS_NO_DATA;
|
||||
case AGENT_MODULE_STATUS_NO_DATA:
|
||||
$text = __('NOT INIT');
|
||||
$color = COL_NOTINIT;
|
||||
break;
|
||||
|
||||
case AGENT_MODULE_STATUS_CRITICAL_ALERT;
|
||||
case AGENT_MODULE_STATUS_NORMAL_ALERT;
|
||||
case AGENT_MODULE_STATUS_WARNING_ALERT;
|
||||
case AGENT_MODULE_STATUS_CRITICAL_ALERT:
|
||||
case AGENT_MODULE_STATUS_NORMAL_ALERT:
|
||||
case AGENT_MODULE_STATUS_WARNING_ALERT:
|
||||
$text = __('ALERT');
|
||||
$color = COL_ALERTFIRED;
|
||||
break;
|
||||
|
||||
case AGENT_MODULE_STATUS_WARNING;
|
||||
case AGENT_MODULE_STATUS_WARNING:
|
||||
$text = __('WARNING');
|
||||
$color = COL_WARNING;
|
||||
break;
|
||||
@ -2417,8 +2424,6 @@ try {
|
||||
100,
|
||||
200,
|
||||
500,
|
||||
1000,
|
||||
-1,
|
||||
],
|
||||
[
|
||||
$config['block_size'],
|
||||
@ -2427,8 +2432,6 @@ try {
|
||||
100,
|
||||
200,
|
||||
500,
|
||||
1000,
|
||||
'All',
|
||||
],
|
||||
],
|
||||
'order' => [
|
||||
@ -2658,7 +2661,7 @@ function process_datatables_callback(table, settings) {
|
||||
|
||||
function countdown_repeat() {
|
||||
var until_time = new Date();
|
||||
until_time.setTime (until_time.getTime () + parseInt(<?php echo ($config['refr'] * 1000); ?>));
|
||||
until_time.setTime (until_time.getTime () + parseInt(<?php echo($config['refr'] * 1000); ?>));
|
||||
return until_time;
|
||||
}
|
||||
|
||||
@ -3076,7 +3079,7 @@ $(document).ready( function() {
|
||||
//Autorefresh in fullscreen
|
||||
var pure = '<?php echo $pure; ?>';
|
||||
if(pure == 1){
|
||||
var refresh_interval = parseInt('<?php echo ($config['refr'] * 1000); ?>');
|
||||
var refresh_interval = parseInt('<?php echo($config['refr'] * 1000); ?>');
|
||||
var until_time='';
|
||||
|
||||
// If autorefresh is disabled, don't show the countdown
|
||||
@ -3087,7 +3090,7 @@ $(document).ready( function() {
|
||||
|
||||
function events_refresh() {
|
||||
until_time = new Date();
|
||||
until_time.setTime (until_time.getTime () + parseInt(<?php echo ($config['refr'] * 1000); ?>));
|
||||
until_time.setTime (until_time.getTime () + parseInt(<?php echo($config['refr'] * 1000); ?>));
|
||||
|
||||
$("#refrcounter").countdown ({
|
||||
until: until_time,
|
||||
|
@ -2,8 +2,8 @@
|
||||
# Pandora FMS Console
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.768
|
||||
%define release 230210
|
||||
%define version 7.0NG.769
|
||||
%define release 230222
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
@ -2,8 +2,8 @@
|
||||
# Pandora FMS Console
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.768
|
||||
%define release 230210
|
||||
%define version 7.0NG.769
|
||||
%define release 230222
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
@ -2,8 +2,8 @@
|
||||
# Pandora FMS Console
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.768
|
||||
%define release 230210
|
||||
%define version 7.0NG.769
|
||||
%define release 230222
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
@ -9,7 +9,7 @@
|
||||
# This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.768"
|
||||
PI_VERSION="7.0NG.769"
|
||||
FORCE=0
|
||||
DESTDIR=""
|
||||
LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`
|
||||
|
@ -2323,7 +2323,7 @@ CREATE TABLE IF NOT EXISTS `tsessions_php` (
|
||||
-- ---------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tmap` (
|
||||
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_group` INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
`id_group` TEXT NOT NULL DEFAULT '',
|
||||
`id_user` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`type` INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
`subtype` INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
|
@ -97,7 +97,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
||||
('first_login', 0),
|
||||
('mins_fail_pass', 5),
|
||||
('number_attempts', 5),
|
||||
('enable_pass_policy_admin', 0),
|
||||
('enable_pass_policy_admin', 1),
|
||||
('enable_pass_history', 0),
|
||||
('compare_pass', 3),
|
||||
('meta_style', 'meta_pandora'),
|
||||
@ -112,10 +112,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
||||
('custom_report_front_logo', 'images/pandora_logo_white.jpg'),
|
||||
('custom_report_front_header', ''),
|
||||
('custom_report_front_footer', ''),
|
||||
('MR', 60),
|
||||
('MR', 61),
|
||||
('identification_reminder', 1),
|
||||
('identification_reminder_timestamp', 0),
|
||||
('current_package', 768),
|
||||
('current_package', 769),
|
||||
('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.00097656250000":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'),
|
||||
('custom_docs_logo', 'default_docs.png'),
|
||||
('custom_support_logo', 'default_support.png'),
|
||||
|
@ -1,5 +1,5 @@
|
||||
package: pandorafms-server
|
||||
Version: 7.0NG.768-230210
|
||||
Version: 7.0NG.769-230222
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
@ -14,7 +14,7 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.768-230210"
|
||||
pandora_version="7.0NG.769-230222"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
@ -801,7 +801,7 @@ sub main() {
|
||||
# Testing API url
|
||||
my $curl_execution = "'".$Config{'console_api_url'}."?op=get&op2=test&apipass=".$Config{"console_api_pass"}."&user=".$Config{"console_user"}."&pass=".$Config{"console_pass"}."'";
|
||||
# More than 30 secs is highly unrecommendated
|
||||
my $command = $Config{'plugin_exec'}.' 30 curl '.$curl_execution.' 2>/dev/null';
|
||||
my $command = $Config{'plugin_exec'}.' 30 curl --cookie-jar /tmp/cron-session-cookies '.$curl_execution.' 2>/dev/null';
|
||||
my $exe_testing_api = `$command`;
|
||||
my @res_testing_api = split(',', $exe_testing_api);
|
||||
if ( $res_testing_api[0] ne 'OK' ) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
#############################################################################
|
||||
# Pandora FMS Server Parameters
|
||||
# Pandora FMS, the Flexible Monitoring System.
|
||||
# Version 7.0NG.768
|
||||
# Version 7.0NG.769
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -45,8 +45,8 @@ our @EXPORT = qw(
|
||||
);
|
||||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.768";
|
||||
my $pandora_build = "230210";
|
||||
my $pandora_version = "7.0NG.769";
|
||||
my $pandora_build = "230222";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
@ -5628,16 +5628,26 @@ sub pandora_server_statistics ($$) {
|
||||
# Non-dataserver LAG calculation:
|
||||
if ($server->{"server_type"} != DATASERVER){
|
||||
|
||||
$lag_row = get_db_single_row ($dbh, "SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag, AVG(UNIX_TIMESTAMP() - utimestamp - current_interval) AS lag
|
||||
FROM tagente_estado, tagente_modulo
|
||||
WHERE utimestamp > 0
|
||||
$lag_row = get_db_single_row ($dbh,
|
||||
"SELECT COUNT(tam.id_agente_modulo) AS module_lag, AVG(UNIX_TIMESTAMP() - tae.last_execution_try - tae.current_interval) AS lag
|
||||
FROM (
|
||||
SELECT tagente_estado.last_execution_try, tagente_estado.current_interval, tagente_estado.id_agente_modulo
|
||||
FROM tagente_estado
|
||||
WHERE tagente_estado.current_interval > 0
|
||||
AND tagente_estado.last_execution_try > 0
|
||||
AND tagente_estado.running_by = ?
|
||||
) tae
|
||||
JOIN (
|
||||
SELECT tagente_modulo.id_agente_modulo, tagente_modulo.flag
|
||||
FROM tagente_modulo LEFT JOIN tagente
|
||||
ON tagente_modulo.id_agente = tagente.id_agente
|
||||
WHERE tagente.disabled = 0
|
||||
AND tagente_modulo.disabled = 0
|
||||
AND tagente_modulo.id_tipo_modulo < 5
|
||||
AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo
|
||||
AND current_interval > 0
|
||||
AND (UNIX_TIMESTAMP() - utimestamp) < ( current_interval * 10)
|
||||
AND running_by = ?
|
||||
AND (UNIX_TIMESTAMP() - utimestamp) > (current_interval * 1.1)", $server->{"id_server"});
|
||||
) tam
|
||||
ON tae.id_agente_modulo = tam.id_agente_modulo
|
||||
WHERE (UNIX_TIMESTAMP() - tae.last_execution_try) < ( tae.current_interval * 10)
|
||||
AND (tam.flag = 1 OR (UNIX_TIMESTAMP() - tae.last_execution_try) > tae.current_interval)", $server->{"id_server"});
|
||||
}
|
||||
# Dataserver LAG calculation:
|
||||
else {
|
||||
|
@ -221,10 +221,14 @@ sub data_consumer ($$) {
|
||||
|
||||
if ($task->{'type'} == DISCOVERY_APP_SAP) {
|
||||
# SAP TASK, retrieve license.
|
||||
if (defined($task->{'field4'}) && $task->{'field4'} ne "") {
|
||||
$task->{'sap_license'} = $task->{'field4'};
|
||||
} else {
|
||||
$task->{'sap_license'} = pandora_get_config_value(
|
||||
$dbh,
|
||||
'sap_license'
|
||||
);
|
||||
}
|
||||
|
||||
# Retrieve credentials for task (optional).
|
||||
if (defined($task->{'auth_strings'})
|
||||
|
@ -33,8 +33,8 @@ use base 'Exporter';
|
||||
our @ISA = qw(Exporter);
|
||||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.768";
|
||||
my $pandora_build = "230210";
|
||||
my $pandora_version = "7.0NG.769";
|
||||
my $pandora_build = "230222";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
@ -1,9 +1,10 @@
|
||||
#
|
||||
# Pandora FMS Server
|
||||
#
|
||||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.768
|
||||
%define release 230210
|
||||
%define version 7.0NG.769
|
||||
%define release 230222
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
@ -109,6 +110,12 @@ rm -fr $RPM_BUILD_ROOT
|
||||
getent passwd pandora >/dev/null || \
|
||||
/usr/sbin/useradd -d %{prefix}/pandora_server -s /sbin/nologin -M -g 0 pandora
|
||||
|
||||
current_ver=$(perl -le 'eval "require $ARGV[0]" and print $ARGV[0]->VERSION' Thread::Semaphore 2> /dev/null | cut -d '.' -f 2)
|
||||
if [ $((current_ver)) -lt 13 ] ; then
|
||||
echo "perl Thread::Semaphore version >= 2.13 should be installed. Current version installed ver: $(perl -le 'eval "require $ARGV[0]" and print $ARGV[0]->VERSION' Thread::Semaphore 2> /dev/null)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
%post
|
||||
@ -176,6 +183,12 @@ if [ "$1" = "1" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
current_ver=$(perl -le 'eval "require $ARGV[0]" and print $ARGV[0]->VERSION' Thread::Semaphore 2> /dev/null | cut -d '.' -f 2)
|
||||
if [ $((current_ver)) -lt 13 ] ; then
|
||||
echo "perl Thread::Semaphore version >= 2.13 should be installed. Current version installed ver: $(perl -le 'eval "require $ARGV[0]" and print $ARGV[0]->VERSION' Thread::Semaphore 2> /dev/null)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/sbin/service pandora_server stop >/dev/null 2>&1 || :
|
||||
/sbin/service tentacle_serverd stop >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del pandora_server
|
||||
|
@ -1,9 +1,10 @@
|
||||
#
|
||||
# Pandora FMS Server
|
||||
#
|
||||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.768
|
||||
%define release 230210
|
||||
%define version 7.0NG.769
|
||||
%define release 230222
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
@ -100,7 +101,11 @@ if [ "`id pandora | grep uid | wc -l`" = 0 ]
|
||||
then
|
||||
/usr/sbin/useradd -d %{prefix}/pandora -s /bin/false -M -g 0 pandora
|
||||
fi
|
||||
exit 0
|
||||
current_ver=$(perl -le 'eval "require $ARGV[0]" and print $ARGV[0]->VERSION' Thread::Semaphore 2> /dev/null | cut -d '.' -f 2)
|
||||
if [ $((current_ver)) -lt 13 ] ; then
|
||||
echo "perl Thread::Semaphore version >= 2.13 should be installed. Current version installed ver: $(perl -le 'eval "require $ARGV[0]" and print $ARGV[0]->VERSION' Thread::Semaphore 2> /dev/null)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
%post
|
||||
if [ `command -v systemctl` ];
|
||||
@ -172,6 +177,12 @@ if [ "$1" = "1" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
current_ver=$(perl -le 'eval "require $ARGV[0]" and print $ARGV[0]->VERSION' Thread::Semaphore 2> /dev/null | cut -d '.' -f 2)
|
||||
if [ $((current_ver)) -lt 13 ] ; then
|
||||
echo "perl Thread::Semaphore version >= 2.13 should be installed. Current version installed ver: $(perl -le 'eval "require $ARGV[0]" and print $ARGV[0]->VERSION' Thread::Semaphore 2> /dev/null)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/etc/init.d/pandora_server stop &>/dev/null
|
||||
/etc/init.d/tentacle_serverd stop &>/dev/null
|
||||
chkconfig --del pandora_server
|
||||
|
@ -8,8 +8,8 @@
|
||||
# This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.768"
|
||||
PI_BUILD="230210"
|
||||
PI_VERSION="7.0NG.769"
|
||||
PI_BUILD="230222"
|
||||
|
||||
MODE=$1
|
||||
if [ $# -gt 1 ]; then
|
||||
|
@ -35,7 +35,7 @@ use PandoraFMS::Config;
|
||||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.768 Build 230210";
|
||||
my $version = "7.0NG.769 Build 230222";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
@ -53,6 +53,9 @@ my $SMALL_OPERATION_STEP = 1000; # 1000 is default
|
||||
# Timeout for lock acquisition.
|
||||
my $LOCK_TIMEOUT = 60;
|
||||
|
||||
# Cron cookies file.
|
||||
my $COOKIES_FILE = '/tmp/cron-session-cookies';
|
||||
|
||||
# FLUSH in each IO
|
||||
$| = 1;
|
||||
|
||||
@ -1067,12 +1070,17 @@ sub pandora_delete_old_session_data {
|
||||
|
||||
$ulimit_timestamp = time() - $session_timeout;
|
||||
|
||||
log_message ('PURGE', "Deleting old session data from tsessions_php\n");
|
||||
log_message ('PURGE', "Deleting old session data from tsessions_php");
|
||||
while(db_delete_limit ($dbh, 'tsessions_php', 'last_active < ?', $SMALL_OPERATION_STEP, $ulimit_timestamp) ne '0E0') {
|
||||
usleep (10000);
|
||||
};
|
||||
|
||||
db_do ($dbh, "DELETE FROM tsessions_php WHERE data IS NULL OR id_session REGEXP '^cron-'");
|
||||
|
||||
# Delete cron cookies file
|
||||
log_message ('PURGE', "Deleting cron session file");
|
||||
unlink($COOKIES_FILE);
|
||||
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
||||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.768 Build 230210";
|
||||
my $version = "7.0NG.769 Build 230222";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
@ -571,7 +571,7 @@ foreach my $iface (keys %{$analysis_tree}) {
|
||||
$inUsage += $analysis_tree->{$iface}{'inUsage'};
|
||||
$j++;
|
||||
}
|
||||
if (is_enabled($analysis_tree->{$iface}{'outUsage'}) || $analysis_tree->{$iface}{'inUsage'} == 0) {
|
||||
if (is_enabled($analysis_tree->{$iface}{'outUsage'}) || $analysis_tree->{$iface}{'outUsage'} == 0) {
|
||||
$outUsage += $analysis_tree->{$iface}{'outUsage'};
|
||||
$k++;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user