From 699b5104825ec9e4e744e74d7b3074b3b19ba63b Mon Sep 17 00:00:00 2001 From: Rafael Ameijeiras Date: Tue, 14 Dec 2021 16:28:33 +0100 Subject: [PATCH 01/15] add support for cloud installation to rh/alma/rocky/centos 8 --- .../pandora_deploy_community_el8.sh | 118 +++++++++++++----- 1 file changed, 84 insertions(+), 34 deletions(-) diff --git a/extras/deploy-scripts/pandora_deploy_community_el8.sh b/extras/deploy-scripts/pandora_deploy_community_el8.sh index b5b2935192..8dcc634961 100644 --- a/extras/deploy-scripts/pandora_deploy_community_el8.sh +++ b/extras/deploy-scripts/pandora_deploy_community_el8.sh @@ -1,17 +1,31 @@ #!/bin/bash +####################################################### +# PandoraFMS Community online installation script +####################################################### +## Tested versions ## +# Centos 8.4, 8.5 +# Rocky 8.4, 8.5 +# Almalinuz 8.4, 8.5 +# RedHat N/A -# define variables +#Constants PANDORA_CONSOLE=/var/www/html/pandora_console -CONSOLE_PATH=/var/www/html/pandora_console PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf -DBHOST=127.0.0.1 -DBNAME=pandora -DBUSER=pandora -DBPASS=pandora -DBPORT=3306 -S_VERSION='2021070101' + +S_VERSION='2021121401' LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log" +# define default variables +[ "$TZ" ] || TZ="Europe/Madrid" +[ "$DBHOST" ] || DBHOST=127.0.0.1 +[ "$DBNAME" ] || DBNAME=pandora +[ "$DBUSER" ] || DBUSER=pandora +[ "$DBPASS" ] || DBPASS=pandora +[ "$DBPORT" ] || DBPORT=3306 +[ "$DBROOTPASS" ] || DBROOTPASS=pandora +[ "$SKIP_PRECHECK" ] || SKIP_PRECHECK=0 +[ "$SKIP_DATABASE_INSTALL" ] || SKIP_DATABASE_INSTALL=0 + # Ansi color code variables red="\e[0;91m" green="\e[0;92m" @@ -56,7 +70,7 @@ check_pre_pandora () { echo -en "${cyan}Checking environment ... ${reset}" rpm -qa | grep pandora &>> /dev/null && local fail=true - [ -d "$CONSOLE_PATH" ] && local fail=true + [ -d "$PANDORA_CONSOLE" ] && local fail=true [ -f /usr/bin/pandora_server ] && local fail=true echo "use $DBNAME" | mysql -uroot -P$DBPORT -h$DBHOST &>> /dev/null && local fail=true @@ -74,7 +88,7 @@ check_root_permissions () { echo -en "${cyan}Checking root account... ${reset}" if [ "$(whoami)" != "root" ]; then echo -e "${red}Fail${reset}" - echo "Please use a root account or sudo for installing PandoraFMS" + echo "Please use a root account or sudo for installing Pandora FMS" echo "Error installing Pandora FMS for detailed error please check log: $LOGFILE" exit 1 @@ -87,8 +101,8 @@ check_root_permissions () { echo "Starting PandoraFMS Community deployment EL8 ver. $S_VERSION" # Centos Version -if [ ! "$(grep -Ei 'centos|rocky' /etc/redhat-release)" ]; then - printf "\n ${red}Error this is not a Centos/Rocky Base system, this installer is compatible with Centos/Rocky systems only${reset}\n" +if [ ! "$(grep -Ei 'centos|rocky|Almalinux|Red Hat Enterprise' /etc/redhat-release)" ]; then + printf "\n ${red}Error this is not a Centos/Rocky/Almalinux Base system, this installer is compatible with Centos/Rocky systems only${reset}\n" exit 1 fi @@ -106,7 +120,7 @@ echo "Community installer version: $S_VERSION" >> "$LOGFILE" check_root_permissions # Pre installed pandora -check_pre_pandora +[ "$SKIP_PRECHECK" == 1 ] || check_pre_pandora # Connectivity check_repo_connection @@ -120,6 +134,9 @@ execute_cmd "[ $(grep MemTotal /proc/meminfo | awk '{print $2}') -ge 1700000 ]" # Check disk size at least 10 Gb free space execute_cmd "[ $(df -BM / | tail -1 | awk '{print $4}' | tr -d M) -gt 10000 ]" 'Checking Disk (required: 10 GB free min)' +# Setting timezone +execute_cmd "timedatectl set-timezone $TZ" "Setting Timezone $TZ" + # Execute tools check execute_cmd "awk --version" 'Checking needed tools: awk' execute_cmd "grep --version" 'Checking needed tools: grep' @@ -131,21 +148,53 @@ rm -rf "$HOME"/pandora_deploy_tmp/*.rpm* &>> "$LOGFILE" mkdir "$HOME"/pandora_deploy_tmp &>> "$LOGFILE" execute_cmd "cd $HOME/pandora_deploy_tmp" "Moving to workspace: $HOME/pandora_deploy_tmp" +## Extra steps on redhat envs +if [ "$(grep -Ei 'Red Hat Enterprise' /etc/redhat-release)" ]; then + ## In case REDHAT + # Check susbscription manager status: + echo -en "${cyan}Checking Red Hat Enterprise subscription... ${reset}" + subscription-manager status &>> "$LOGFILE" + subscription-manager list &>> "$LOGFILE" + subscription-manager list | grep 'Status:' | grep Subscribed &>> "$LOGFILE" + check_cmd_status 'Error checking subscription status, make sure your server is activated and suscribed to Red Hat Enterprise repositories' + + # Ckeck repolist + dnf repolist &>> "$LOGFILE" + echo -en "${cyan}Checking Red Hat Enterprise repolist... ${reset}" + dnf repolist | grep 'rhel-8-for-x86_64-baseos-rpms' &>> "$LOGFILE" + check_cmd_status 'Error checking repositories status, could try a subscription-manager attach command or contact sysadmin' + + #install extra repos + extra_repos=" \ + tar \ + dnf-utils \ + https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \ + http://rpms.remirepo.net/enterprise/remi-release-8.rpm \ + https://repo.percona.com/yum/percona-release-latest.noarch.rpm" + + execute_cmd "dnf install -y $extra_repos" "Installing extra repositories" + execute_cmd "subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms" "Enabling subscription to codeready-builder" +else + # For alma/rocky/centos + extra_repos=" \ + tar \ + dnf-utils \ + epel-release \ + http://rpms.remirepo.net/enterprise/remi-release-8.rpm \ + https://repo.percona.com/yum/percona-release-latest.noarch.rpm" + + execute_cmd "dnf install -y $extra_repos" "Installing extra repositories" + execute_cmd "dnf config-manager --set-enabled powertools" "Configuring Powertools" +fi + + #Installing wget execute_cmd "dnf install -y wget" "Installing wget" #Installing extra repositiries -extra_repos=" \ - tar \ - dnf-utils \ - epel-release \ - http://rpms.remirepo.net/enterprise/remi-release-8.rpm \ - https://repo.percona.com/yum/percona-release-latest.noarch.rpm" -execute_cmd "dnf install -y $extra_repos" "Installing extra repositories" -execute_cmd "dnf config-manager --set-enabled powertools" "Configuring Powertools" execute_cmd "dnf module reset -y php " "Disabling standard PHP module" -execute_cmd "dnf module install -y php:remi-7.3" "Configuring PHP" +execute_cmd "dnf module install -y php:remi-7.4" "Configuring PHP" # Install percona Database execute_cmd "dnf module disable -y mysql" "Disabiling mysql module" @@ -297,22 +346,23 @@ setenforce 0 &>> "$LOGFILE" sed -i -e "s/^SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config &>> "$LOGFILE" systemctl disable firewalld --now &>> "$LOGFILE" - +if [ "$SKIP_DATABASE_INSTALL" -eq '0' ] ; then #Configuring Database 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('pandora'); - """ | mysql --connect-expired-password -uroot - -export MYSQL_PWD=$DBPASS + 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 pandora, is this an empty node? if you have a previus installation please contact with support.' +check_cmd_status "Error creating database $DBNAME, is this an empty node? if you have a previus installation please contact with support." echo "GRANT ALL PRIVILEGES ON $DBNAME.* TO \"$DBUSER\"@'%' identified by \"$DBPASS\"" | mysql -uroot -P$DBPORT -h$DBHOST +export MYSQL_PWD=$DBPASS #Generating my.cnf POOL_SIZE=$(grep -i total /proc/meminfo | head -1 | awk '{printf "%.2f \n", $(NF-1)*0.4/1024}' | sed "s/\\..*$/M/g") @@ -368,7 +418,7 @@ execute_cmd "wget http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandora execute_cmd "wget http://firefly.artica.es/centos7/pandorafms_agent_unix-7.0NG.751_x86_64.rpm" "Downloading Pandora FMS Agent community" # Install Pandora -execute_cmd "dnf install -y $HOME/pandora_deploy_tmp/pandorafms*.rpm" "installing PandoraFMS packages" +execute_cmd "dnf install -y $HOME/pandora_deploy_tmp/pandorafms*.rpm" "Installing Pandora FMS packages" # Copy gotty utility execute_cmd "wget https://github.com/yudai/gotty/releases/download/v1.0.1/gotty_linux_amd64.tar.gz" 'Dowloading gotty util' @@ -391,7 +441,7 @@ mysql -u$DBUSER -P$DBPORT -h$DBHOST $DBNAME < $PANDORA_CONSOLE/pandoradb_data.sq check_cmd_status 'Error Loading database schema data' # Configure console -cat > $CONSOLE_PATH/include/config.php << EO_CONFIG_F +cat > $PANDORA_CONSOLE/include/config.php << EO_CONFIG_F > "$LOGFILE" # Prepare php.ini sed -i -e "s/^max_input_time.*/max_input_time = -1/g" /etc/php.ini @@ -558,7 +608,7 @@ chmod 0644 /etc/logrotate.d/pandora_server chmod 0644 /etc/logrotate.d/pandora_agent # Add websocket engine start script. -mv /var/www/html/pandora_console/pandora_websocket_engine /etc/init.d/ +mv /var/www/html/pandora_console/pandora_websocket_engine /etc/init.d/ &>> "$LOGFILE" chmod +x /etc/init.d/pandora_websocket_engine # Start Websocket engine From 324cbfac9448c90d21ebee86dfdd45dbcd2418c8 Mon Sep 17 00:00:00 2001 From: Rafael Ameijeiras Date: Tue, 21 Dec 2021 15:57:47 +0100 Subject: [PATCH 02/15] adding optional skip kernel optimizations --- extras/deploy-scripts/pandora_deploy_community_el8.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extras/deploy-scripts/pandora_deploy_community_el8.sh b/extras/deploy-scripts/pandora_deploy_community_el8.sh index 8dcc634961..c42aa8bbc4 100644 --- a/extras/deploy-scripts/pandora_deploy_community_el8.sh +++ b/extras/deploy-scripts/pandora_deploy_community_el8.sh @@ -25,6 +25,7 @@ LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log" [ "$DBROOTPASS" ] || DBROOTPASS=pandora [ "$SKIP_PRECHECK" ] || SKIP_PRECHECK=0 [ "$SKIP_DATABASE_INSTALL" ] || SKIP_DATABASE_INSTALL=0 +[ "$SKIP_KERNEL_OPTIMIZATIONS" ] || SKIP_KERNEL_OPTIMIZATIONS=0 # Ansi color code variables red="\e[0;91m" @@ -526,6 +527,7 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/$VERSION/client64/lib export ORACLE_HOME=/usr/lib/oracle/$VERSION/client64 EOF_ENV +if [ "$SKIP_KERNEL_OPTIMIZATIONS" -eq '0' ] ; then # Kernel optimization cat >> /etc/sysctl.conf <> "$LOGFILE" # Enable pandora ha service systemctl enable pandora_server --now &>> "$LOGFILE" -execute_cmd "systemctl start pandora_server" "Starting Pandora FMS Server" +execute_cmd "/etc/init.d/pandora_server start" "Starting Pandora FMS Server" # starting tentacle server systemctl enable tentacle_serverd &>> "$LOGFILE" From 3c46271816f066c1b2d877e8156e5ffe4400dfbc Mon Sep 17 00:00:00 2001 From: rafael Date: Mon, 17 Jan 2022 13:14:20 +0100 Subject: [PATCH 03/15] adding variable dbhost to config.php file --- extras/deploy-scripts/pandora_deploy_community.sh | 2 +- extras/deploy-scripts/pandora_deploy_community_el8.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/extras/deploy-scripts/pandora_deploy_community.sh b/extras/deploy-scripts/pandora_deploy_community.sh index 7f70addfec..0acd60b66d 100644 --- a/extras/deploy-scripts/pandora_deploy_community.sh +++ b/extras/deploy-scripts/pandora_deploy_community.sh @@ -148,7 +148,7 @@ http://rpms.remirepo.net/enterprise/remi-release-7.rpm \ https://repo.percona.com/yum/percona-release-latest.noarch.rpm" execute_cmd "yum install -y $extra_repos" "Installing extra repositories" -execute_cmd "yum-config-manager --enable remi-php73" "Configuring PHP" +execute_cmd "yum-config-manager --enable remi-php74" "Configuring PHP" # Install percona Database [ -f /etc/my.cnf ] && rm -rf /etc/my.cnf diff --git a/extras/deploy-scripts/pandora_deploy_community_el8.sh b/extras/deploy-scripts/pandora_deploy_community_el8.sh index c42aa8bbc4..9b1f476e4a 100644 --- a/extras/deploy-scripts/pandora_deploy_community_el8.sh +++ b/extras/deploy-scripts/pandora_deploy_community_el8.sh @@ -6,7 +6,7 @@ # Centos 8.4, 8.5 # Rocky 8.4, 8.5 # Almalinuz 8.4, 8.5 -# RedHat N/A +# RedHat 8.5 #Constants PANDORA_CONSOLE=/var/www/html/pandora_console @@ -281,6 +281,7 @@ console_dependencies=" \ xorg-x11-fonts-misc \ poppler-data \ php-yaml \ + mod_ssl \ 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" @@ -448,7 +449,7 @@ cat > $PANDORA_CONSOLE/include/config.php << EO_CONFIG_F \$config["dbname"]="$DBNAME"; \$config["dbuser"]="$DBUSER"; \$config["dbpass"]="$DBPASS"; -\$config["dbhost"]="localhost"; +\$config["dbhost"]="$DBHOST"; \$config["homedir"]="$PANDORA_CONSOLE"; \$config["homeurl"]="/pandora_console"; error_reporting(0); From 727d6e6690ce02e06cf593f5fb654b5dddad648d Mon Sep 17 00:00:00 2001 From: Rafael Ameijeiras Date: Mon, 24 Jan 2022 17:30:08 +0100 Subject: [PATCH 04/15] adding mssqlobdc and java discovery dependencies to installer --- .../pandora_deploy_community.sh | 89 +++++++++++++------ .../pandora_deploy_community_el8.sh | 25 ++++-- 2 files changed, 80 insertions(+), 34 deletions(-) diff --git a/extras/deploy-scripts/pandora_deploy_community.sh b/extras/deploy-scripts/pandora_deploy_community.sh index 0acd60b66d..6432b4a926 100644 --- a/extras/deploy-scripts/pandora_deploy_community.sh +++ b/extras/deploy-scripts/pandora_deploy_community.sh @@ -1,20 +1,30 @@ #!/bin/bash +####################################################### +# PandoraFMS Community online installation script +####################################################### +## Tested versions ## +# Centos 7.9 -# define variables +#Constants PANDORA_CONSOLE=/var/www/html/pandora_console -CONSOLE_PATH=/var/www/html/pandora_console PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf -PANDORA_SERVER_BIN=/usr/bin/pandora_server -PANDORA_HA_BIN=/usr/bin/pandora_ha -PANDORA_TABLES_MIN=160 -DBHOST=127.0.0.1 -DBNAME=pandora -DBUSER=pandora -DBPASS=pandora -DBPORT=3306 -S_VERSION='2021012801' + +S_VERSION='2022012401' LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log" +# define default variables +[ "$TZ" ] || TZ="Europe/Madrid" +[ "$DBHOST" ] || DBHOST=127.0.0.1 +[ "$DBNAME" ] || DBNAME=pandora +[ "$DBUSER" ] || DBUSER=pandora +[ "$DBPASS" ] || DBPASS=pandora +[ "$DBPORT" ] || DBPORT=3306 +[ "$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") + # Ansi color code variables red="\e[0;91m" green="\e[0;92m" @@ -60,7 +70,7 @@ check_pre_pandora () { echo -en "${cyan}Checking environment ... ${reset}" rpm -qa | grep pandora &>> /dev/null && local fail=true - [ -d "$CONSOLE_PATH" ] && local fail=true + [ -d "$PANDORA_CONSOLE" ] && local fail=true [ -f /usr/bin/pandora_server ] && local fail=true echo "use $DBNAME" | mysql -uroot -P$DBPORT -h$DBHOST &>> /dev/null && local fail=true @@ -111,7 +121,7 @@ echo "Community installer version: $S_VERSION" >> $LOGFILE check_root_permissions # Pre installed pandora -check_pre_pandora +[ "$SKIP_PRECHECK" == 1 ] || check_pre_pandora # Connectivity check_repo_connection @@ -125,6 +135,9 @@ execute_cmd "[ $(grep MemTotal /proc/meminfo | awk '{print $2}') -ge 1700000 ]" # Check disk size at least 10 Gb free space execute_cmd "[ $(df -BM / | tail -1 | awk '{print $4}' | tr -d M) -gt 10000 ]" 'Checking Disk (required: 10 GB free min)' +# Setting timezone +execute_cmd "timedatectl set-timezone $TZ" "Setting Timezone $TZ" + # Execute tools check execute_cmd "awk --version" 'Checking needed tools: awk' execute_cmd "grep --version" 'Checking needed tools: grep' @@ -151,7 +164,7 @@ execute_cmd "yum install -y $extra_repos" "Installing extra repositories" execute_cmd "yum-config-manager --enable remi-php74" "Configuring PHP" # Install percona Database -[ -f /etc/my.cnf ] && rm -rf /etc/my.cnf +#[ -f /etc/my.cnf ] && rm -rf /etc/my.cnf execute_cmd "yum install -y Percona-Server-server-57" "Installing Percona Server" # Console dependencies @@ -256,6 +269,7 @@ server_dependencies=" \ perl(XML::Twig) \ expect \ openssh-clients \ + java \ 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" execute_cmd "yum install -y $server_dependencies" "Installing Pandora FMS Server dependencies" @@ -277,30 +291,49 @@ oracle_dependencies=" \ https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-sqlplus-19.8.0.0.0-1.x86_64.rpm" execute_cmd "yum install -y $oracle_dependencies" "Installing Oracle Instant client" +#ipam dependencies +ipam_dependencies=" \ + http://firefly.artica.es/centos7/xprobe2-0.3-12.2.x86_64.rpm \ + perl(NetAddr::IP) \ + perl(Sys::Syslog) \ + perl(DBI) \ + perl(XML::Simple) \ + perl(Geo::IP) \ + perl(IO::Socket::INET6) \ + perl(XML::Twig)" +execute_cmd "dnf install -y $ipam_dependencies" "Installing IPAM Instant client" + +# MSSQL dependencies el7 +execute_cmd "curl https://packages.microsoft.com/config/rhel/7/prod.repo -o /etc/yum.repos.d/mssql-release.repo" "Configuring Microsoft repositories" +execute_cmd "yum remove unixODBC-utf16 unixODBC-utf16-devel" "Removing default unixODBC packages" +execute_cmd "env ACCEPT_EULA=Y yum install -y msodbcsql17" "Installing ODBC Driver for Microsoft(R) SQL Server(R)" +MS_ID=$(head -1 /etc/odbcinst.ini | tr -d '[]') &>> "$LOGFILE" +#yum config-manager --set-disable packages-microsoft-com-prod + # Disabling SELINUX and firewalld setenforce 0 sed -i -e "s/^SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config systemctl disable firewalld --now &>> $LOGFILE - #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('pandora'); - """ | mysql --connect-expired-password -uroot - -export MYSQL_PWD=$DBPASS + 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 pandora, is this an empty node? if you have a previus installation please contact with support.' +check_cmd_status "Error creating database $DBNAME, is this an empty node? if you have a previus installation please contact with support." echo "GRANT ALL PRIVILEGES ON $DBNAME.* TO \"$DBUSER\"@'%' identified by \"$DBPASS\"" | mysql -uroot -P$DBPORT -h$DBHOST +export MYSQL_PWD=$DBPASS #Generating my.cnf -POOL_SIZE=$(grep -i total /proc/meminfo | head -1 | awk '{printf "%.2f \n", $(NF-1)*0.4/1024}' | sed "s/\\..*$/M/g") cat > /etc/my.cnf << EO_CONFIG_F [mysqld] datadir=/var/lib/mysql @@ -374,13 +407,13 @@ mysql -u$DBUSER -P$DBPORT -h$DBHOST $DBNAME < $PANDORA_CONSOLE/pandoradb_data.sq check_cmd_status 'Error Loading database schema data' # Configure console -cat > $CONSOLE_PATH/include/config.php << EO_CONFIG_F +cat > $PANDORA_CONSOLE/include/config.php << EO_CONFIG_F /etc/pandora/pandora_server.env << 'EOF_ENV' @@ -459,7 +493,7 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/$VERSION/client64/lib export ORACLE_HOME=/usr/lib/oracle/$VERSION/client64 EOF_ENV -# Kernel optimization +if [ "$SKIP_KERNEL_OPTIMIZATIONS" -eq '0' ] ; then cat >> /etc/sysctl.conf <> "$LOGFILE" +#dnf config-manager --set-disable packages-microsoft-com-prod # Disabling SELINUX and firewalld setenforce 0 &>> "$LOGFILE" sed -i -e "s/^SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config &>> "$LOGFILE" systemctl disable firewalld --now &>> "$LOGFILE" -if [ "$SKIP_DATABASE_INSTALL" -eq '0' ] ; then #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 """ @@ -367,7 +377,6 @@ echo "GRANT ALL PRIVILEGES ON $DBNAME.* TO \"$DBUSER\"@'%' identified by \"$DBPA export MYSQL_PWD=$DBPASS #Generating my.cnf -POOL_SIZE=$(grep -i total /proc/meminfo | head -1 | awk '{printf "%.2f \n", $(NF-1)*0.4/1024}' | sed "s/\\..*$/M/g") cat > /etc/my.cnf << EO_CONFIG_F [mysqld] datadir=/var/lib/mysql @@ -518,6 +527,7 @@ sed -i -e "s/^dbname.*/dbname $DBNAME/g" $PANDORA_SERVER_CONF sed -i -e "s/^dbuser.*/dbuser $DBUSER/g" $PANDORA_SERVER_CONF sed -i -e "s|^dbpass.*|dbpass $DBPASS|g" $PANDORA_SERVER_CONF sed -i -e "s/^dbport.*/dbport $DBPORT/g" $PANDORA_SERVER_CONF +sed -i -e "s/^#.mssql_driver.*/mssql_driver $MS_ID/g" $PANDORA_SERVER_CONF # Set Oracle environment for pandora_server cat > /etc/pandora/pandora_server.env << 'EOF_ENV' @@ -528,8 +538,9 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/$VERSION/client64/lib export ORACLE_HOME=/usr/lib/oracle/$VERSION/client64 EOF_ENV -if [ "$SKIP_KERNEL_OPTIMIZATIONS" -eq '0' ] ; then # Kernel optimization + +if [ "$SKIP_KERNEL_OPTIMIZATIONS" -eq '0' ] ; then cat >> /etc/sysctl.conf < Date: Mon, 24 Jan 2022 17:57:18 +0100 Subject: [PATCH 05/15] fixing typos, handling reinsntall errors --- extras/deploy-scripts/pandora_deploy_community.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extras/deploy-scripts/pandora_deploy_community.sh b/extras/deploy-scripts/pandora_deploy_community.sh index 6432b4a926..76ef946bff 100644 --- a/extras/deploy-scripts/pandora_deploy_community.sh +++ b/extras/deploy-scripts/pandora_deploy_community.sh @@ -289,7 +289,7 @@ execute_cmd "yum install -y $vmware_dependencies" "Installing SDK VMware perl de oracle_dependencies=" \ 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" -execute_cmd "yum install -y $oracle_dependencies" "Installing Oracle Instant client" +execute_cmd "yum install -y $oracle_dependencies || yum reinstall -y $oracle_dependencies" "Installing Oracle Instant client" #ipam dependencies ipam_dependencies=" \ @@ -301,7 +301,7 @@ ipam_dependencies=" \ perl(Geo::IP) \ perl(IO::Socket::INET6) \ perl(XML::Twig)" -execute_cmd "dnf install -y $ipam_dependencies" "Installing IPAM Instant client" +execute_cmd "yum install -y $ipam_dependencies" "Installing IPAM Instant client" # MSSQL dependencies el7 execute_cmd "curl https://packages.microsoft.com/config/rhel/7/prod.repo -o /etc/yum.repos.d/mssql-release.repo" "Configuring Microsoft repositories" From f3b8a54b1dd0fcd1306a0aca69840791a25dd9f3 Mon Sep 17 00:00:00 2001 From: Rafael Ameijeiras Date: Wed, 26 Jan 2022 08:17:36 +0100 Subject: [PATCH 06/15] fixing typos, adding latest pandora agent installation --- extras/deploy-scripts/pandora_deploy_community.sh | 9 +++++++-- extras/deploy-scripts/pandora_deploy_community_el8.sh | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/extras/deploy-scripts/pandora_deploy_community.sh b/extras/deploy-scripts/pandora_deploy_community.sh index 76ef946bff..2e617eeeb1 100644 --- a/extras/deploy-scripts/pandora_deploy_community.sh +++ b/extras/deploy-scripts/pandora_deploy_community.sh @@ -8,6 +8,8 @@ #Constants PANDORA_CONSOLE=/var/www/html/pandora_console PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf +PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf + S_VERSION='2022012401' LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log" @@ -383,7 +385,7 @@ execute_cmd "systemctl restart mysqld" "Configuring database engine" # Downloading Pandora Packages execute_cmd "wget http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm" "Downloading Pandora FMS Server community" execute_cmd "wget http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.noarch.rpm" "Downloading Pandora FMS Console community" -execute_cmd "wget http://firefly.artica.es/centos7/pandorafms_agent_unix-7.0NG.751_x86_64.rpm" "Downloading Pandora FMS Agent community" +execute_cmd "wget http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_unix-7.0NG.noarch.rpm" "Downloading Pandora FMS Agent community" # Install Pandora execute_cmd "yum install -y $HOME/pandora_deploy_tmp/pandorafms*.rpm" "installing PandoraFMS packages" @@ -484,6 +486,9 @@ sed -i -e "s|^dbpass.*|dbpass $DBPASS|g" $PANDORA_SERVER_CONF sed -i -e "s/^dbport.*/dbport $DBPORT/g" $PANDORA_SERVER_CONF sed -i -e "s/^#.mssql_driver.*/mssql_driver $MS_ID/g" $PANDORA_SERVER_CONF +# Enable agent remote config +sed -i "s/^remote_config.*$/remote_config 1/g" $PANDORA_AGENT_CONF + # Set Oracle environment for pandora_server cat > /etc/pandora/pandora_server.env << 'EOF_ENV' #!/bin/bash @@ -598,7 +603,7 @@ execute_cmd "echo \"* * * * * root wget -q -O - --no-check-certificate http://12 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 agent systemctl enable pandora_agent_daemon &>> $LOGFILE -execute_cmd "systemctl start pandora_agent_daemon" "starting Pandora FMS Agent" +execute_cmd "systemctl start pandora_agent_daemon" "Starting Pandora FMS Agent" #SSH banner [ "$(curl -s ifconfig.me)" ] && ipplublic=$(curl -s ifconfig.me) diff --git a/extras/deploy-scripts/pandora_deploy_community_el8.sh b/extras/deploy-scripts/pandora_deploy_community_el8.sh index 94ff74d3f1..5b0bc37b1e 100644 --- a/extras/deploy-scripts/pandora_deploy_community_el8.sh +++ b/extras/deploy-scripts/pandora_deploy_community_el8.sh @@ -11,6 +11,8 @@ #Constants PANDORA_CONSOLE=/var/www/html/pandora_console PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf +PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf + S_VERSION='2022012401' LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log" @@ -426,7 +428,7 @@ execute_cmd "systemctl restart mysqld" "Configuring database engine" # Downloading Pandora Packages execute_cmd "wget http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm" "Downloading Pandora FMS Server community" execute_cmd "wget http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.noarch.rpm" "Downloading Pandora FMS Console community" -execute_cmd "wget http://firefly.artica.es/centos7/pandorafms_agent_unix-7.0NG.751_x86_64.rpm" "Downloading Pandora FMS Agent community" +execute_cmd "wget http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_unix-7.0NG.noarch.rpm" "Downloading Pandora FMS Agent community" # Install Pandora execute_cmd "dnf install -y $HOME/pandora_deploy_tmp/pandorafms*.rpm" "Installing Pandora FMS packages" @@ -529,6 +531,9 @@ sed -i -e "s|^dbpass.*|dbpass $DBPASS|g" $PANDORA_SERVER_CONF sed -i -e "s/^dbport.*/dbport $DBPORT/g" $PANDORA_SERVER_CONF sed -i -e "s/^#.mssql_driver.*/mssql_driver $MS_ID/g" $PANDORA_SERVER_CONF +# Enable agent remote config +sed -i "s/^remote_config.*$/remote_config 1/g" $PANDORA_AGENT_CONF + # Set Oracle environment for pandora_server cat > /etc/pandora/pandora_server.env << 'EOF_ENV' #!/bin/bash @@ -645,7 +650,7 @@ execute_cmd "echo \"* * * * * root wget -q -O - --no-check-certificate http://12 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 agent systemctl enable pandora_agent_daemon &>> "$LOGFILE" -execute_cmd "systemctl start pandora_agent_daemon" "starting Pandora FMS Agent" +execute_cmd "systemctl start pandora_agent_daemon" "Starting Pandora FMS Agent" #SSH banner [ "$(curl -s ifconfig.me)" ] && ipplublic=$(curl -s ifconfig.me) From dc74b7812e222b18201f0912459ee0bd5f53d36b Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Wed, 26 Jan 2022 12:09:30 +0100 Subject: [PATCH 07/15] Lower the verbosity of alert timeout messages. Ref. pandora_enterprise#7974. --- pandora_server/lib/PandoraFMS/Core.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 92b48a8711..2fde19d3ba 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -1400,7 +1400,7 @@ sub pandora_execute_action ($$$$$$$$$;$$) { my $return_code = ($? >> 8) & 0xff; logger($pa_config, "Command '$command_timeout' for action '" . safe_output($action->{'name'}) . "' alert '". safe_output($alert->{'name'}) . "' agent '" . (defined ($agent) ? safe_output($agent->{'alias'}) : 'N/A') . "' returned with errorlevel " . $return_code, 8); if ($return_code != 0) { - logger ($pa_config, "Action '" . safe_output($action->{'name'}) . "' alert '" . safe_output($alert->{'name'}) . "' agent '" . (defined ($agent) ? safe_output($agent->{'alias'}) : 'N/A') . "' exceeded the global alert timeout " . $pa_config->{'global_alert_timeout'} . " seconds" , 8); + logger ($pa_config, "Action '" . safe_output($action->{'name'}) . "' alert '" . safe_output($alert->{'name'}) . "' agent '" . (defined ($agent) ? safe_output($agent->{'alias'}) : 'N/A') . "' exceeded the global alert timeout " . $pa_config->{'global_alert_timeout'} . " seconds" , 3); } } }; From 8a868c9fdecc341d21bf0a1bf18ec6fb27d01431 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 26 Jan 2022 17:15:39 +0100 Subject: [PATCH 08/15] Fixed GIs map --- .../godmode/gis_maps/configure_gis_map.php | 959 ++++++++---------- .../operation/gis_maps/render_view.php | 2 +- 2 files changed, 435 insertions(+), 526 deletions(-) diff --git a/pandora_console/godmode/gis_maps/configure_gis_map.php b/pandora_console/godmode/gis_maps/configure_gis_map.php index b8b3e62e49..4362bcf98c 100644 --- a/pandora_console/godmode/gis_maps/configure_gis_map.php +++ b/pandora_console/godmode/gis_maps/configure_gis_map.php @@ -71,6 +71,42 @@ foreach ($layer_ids as $layer_id) { $next_action = 'new_map'; +$url = 'index.php?sec='.$sec.'&sec2='.$sec2.'&map_id='.$idMap.'&action='.$next_action; + +$buttons['gis_maps_list'] = [ + 'active' => false, + 'text' => ''.html_print_image( + 'images/list.png', + true, + [ + 'title' => __('GIS Maps list'), + 'class' => 'invert_filter', + ] + ).'', +]; +if ($idMap) { + $buttons['view_gis'] = [ + 'active' => false, + 'text' => ''.html_print_image( + 'images/op_gis.png', + true, + [ + 'title' => __('View GIS'), + 'class' => 'invert_filter', + ] + ).'', + ]; +} + +ui_print_page_header( + __('GIS Maps builder'), + 'images/gm_gis.png', + false, + 'configure_gis_map_edit', + true, + $buttons +); + switch ($action) { case 'save_new': $map_name = get_parameter('map_name'); @@ -269,42 +305,6 @@ switch ($action) { break; } -$url = 'index.php?sec='.$sec.'&sec2='.$sec2.'&map_id='.$idMap.'&action='.$next_action; - -$buttons['gis_maps_list'] = [ - 'active' => false, - 'text' => ''.html_print_image( - 'images/list.png', - true, - [ - 'title' => __('GIS Maps list'), - 'class' => 'invert_filter', - ] - ).'', -]; -if ($idMap) { - $buttons['view_gis'] = [ - 'active' => false, - 'text' => ''.html_print_image( - 'images/op_gis.png', - true, - [ - 'title' => __('View GIS'), - 'class' => 'invert_filter', - ] - ).'', - ]; -} - -ui_print_page_header( - __('GIS Maps builder'), - 'images/gm_gis.png', - false, - 'configure_gis_map_edit', - true, - $buttons -); - ?> '; // Load the data in edit or reload in update. From 2bfd2e261193a1a9e6befdc184b35b06a3bf8c01 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Tue, 1 Feb 2022 17:13:13 +0100 Subject: [PATCH 11/15] minor fix --- .../include/rest-api/models/VisualConsole/Item.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/rest-api/models/VisualConsole/Item.php b/pandora_console/include/rest-api/models/VisualConsole/Item.php index 420a8ce7ad..7c0acf92ec 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Item.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Item.php @@ -1112,11 +1112,21 @@ class Item extends CachedModel // The layout can be from another node. $linkedLayoutNodeId = $linkedVisualConsole['linkedLayoutNodeId']; - // Check ACL. + if (empty($linkedLayoutNodeId) === false && \is_metaconsole() === true) { + $db_connector = metaconsole_get_connection_by_id($linkedLayoutNodeId); + metaconsole_load_external_db($db_connector); + } + $visualConsole = VC::fromDB(['id' => $vcId]); + + if (empty($linkedLayoutNodeId) === false && \is_metaconsole() === true) { + metaconsole_restore_db(); + } + $visualConsoleData = $visualConsole->toArray(); $vcGroupId = $visualConsoleData['groupId']; + // Check ACL. $aclRead = \check_acl($config['id_user'], $vcGroupId, 'VR'); // To build the link to another visual console // you must have read permissions of the visual console From f342a218baf7952117d76f872bbe33129fac33e8 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 2 Feb 2022 13:51:04 +0100 Subject: [PATCH 12/15] fix link pandora_enterprise#8518 --- pandora_console/operation/agentes/status_monitor.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 5e5ab2b43f..3d869a02dd 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -1777,6 +1777,13 @@ $table->data[4][0] .= __('Not condition').' '.ui_print_help_tip(__('If you } if (!is_snapshot_data($row['datos'])) { + if ($tresholds === true || $graph_type === 'boolean') { + unset($graph_params['histogram']); + } + + $graph_params_str = http_build_query($graph_params); + + $link = 'winopeng_var(\''.$url.'?'.$graph_params_str.'\',\''.$win_handle.'\', 800, 480)'; $data[8] .= ''.html_print_image('images/chart.png', true, ['border' => '0', 'alt' => '', 'class' => 'invert_filter']).''; } From a438f2b1d33a232098dabf9ac71400e3b03f89ca Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Wed, 2 Feb 2022 15:04:07 +0100 Subject: [PATCH 13/15] Improved information console task --- pandora_console/include/functions_cron.php | 69 ++++++++++++++-------- 1 file changed, 46 insertions(+), 23 deletions(-) diff --git a/pandora_console/include/functions_cron.php b/pandora_console/include/functions_cron.php index bbcd1f4293..bbbac884b5 100644 --- a/pandora_console/include/functions_cron.php +++ b/pandora_console/include/functions_cron.php @@ -532,13 +532,20 @@ function cron_list_table() continue; } - $email = $args[1]; - $report_type = $args[4]; - $data[2] .= '
- '.__('Report').": "; - $data[2] .= $report['name'].''; - $data[2] .= '
- '.__('Report type').': '.$report_type; - $data[2] .= '
- '.__('Email').": "; - $data[2] .= ui_print_truncate_text($email, 60, false).''; + $email = ui_print_truncate_text($args[1], 120); + $reportName = ui_print_truncate_text($report['name'], 120); + $reportType = $args[4]; + $data[2] .= html_print_anchor( + [ + 'href' => ui_get_full_url( + 'index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id='.$args[0] + ), + 'content' => $reportName, + ], + true + ); + $data[2] .= '
- '.__('Report type').': '.$reportType; + $data[2] .= '
- '.__('Email').': '.$email; break; case 'cron_task_generate_report_by_template': @@ -582,32 +589,48 @@ function cron_list_table() } if (empty($args[1]) === false && (string) $args[1] !== '0') { - $agents_id = $args[1]; + if (is_metaconsole() === true) { + $tmpAgents = explode(',', $args[1]); + $agentsId = ''; + foreach ($tmpAgents as $tmpAgent) { + $tmpAgentData = explode('|', $tmpAgent); + $agentsId .= (empty($agentsId) === false) ? ', '.$tmpAgentData[2] : $tmpAgentData[2]; + } + } } else { if (empty($args[2]) === false) { - $agents_id = sprintf( - '(%s) %s', + $agentsId = sprintf( + '(%s) %s', __('regex'), $args[2] ); } else { - $agents_id = __('None'); + $agentsId = __('None'); } } - $report_type = $args[8]; - $report_per_agent = $args[3]; - $report_name = $args[4]; - $email = $args[5]; + // Assignations. + $agentsId = ui_print_truncate_text($agentsId, 120); + $reportPerAgent = ((string) $args[3] === '1') ? __('Yes') : __('No'); + $reportName = ui_print_truncate_text($args[4], 120); + $email = ui_print_truncate_text($args[5], 120); + $reportType = $args[8]; + // Table row. $data[2] .= '
- '.__('Template').': '; - $data[2] .= ''; - $data[2] .= $template['name'].''; - $data[2] .= '
- '.__('Agents').': '.ui_print_truncate_text($agents_id, 120).''; - $data[2] .= '
- '.__('Report per agent').': '.$report_per_agent.''; - $data[2] .= '
- '.__('Report name').': '.$report_name.''; - $data[2] .= '
- '.__('Email').": ".$email.''; - $data[2] .= '
- '.__('Report type').': '.$report_type; - + $data[2] .= html_print_anchor( + [ + 'href' => ui_get_full_url( + 'index.php?sec=reporting&sec2=enterprise/godmode/reporting/reporting_builder.template&action=edit&id_template='.$args[0] + ), + 'content' => $template['name'], + ], + true + ); + $data[2] .= '
- '.__('Agents').': '.$agentsId; + $data[2] .= '
- '.__('Report per agent').': '.$reportPerAgent; + $data[2] .= '
- '.__('Report name').': '.$reportName; + $data[2] .= '
- '.__('Email').': '.$email; + $data[2] .= '
- '.__('Report type').': '.$reportType; break; case 'cron_task_execute_custom_script': From 7d405d8ded569f4b2e7d98412cdde64e2165923a Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 3 Feb 2022 01:00:20 +0100 Subject: [PATCH 14/15] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index f1adc4aced..295c497030 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.759-220202 +Version: 7.0NG.759-220203 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 e50e34915e..02e8f8d327 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.759-220202" +pandora_version="7.0NG.759-220203" 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 a1e92986d8..ee9e283494 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.759'; -use constant AGENT_BUILD => '220202'; +use constant AGENT_BUILD => '220203'; # 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 2f34c49649..46155eb4df 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.759 -%define release 220202 +%define release 220203 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 d89eaf63b2..0ac8b290b5 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.759 -%define release 220202 +%define release 220203 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 649ef1ab95..d9043d9712 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.759" -PI_BUILD="220202" +PI_BUILD="220203" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 0e37901ba1..cb623693a3 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220202} +{220203} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index b09e2700eb..1ad5db3154 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.759 Build 220202") +#define PANDORA_VERSION ("7.0NG.759 Build 220203") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index afe809eebe..72f1cec94e 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.759(Build 220202))" + VALUE "ProductVersion", "(7.0NG.759(Build 220203))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 9998bb0d3f..c969449cea 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.759-220202 +Version: 7.0NG.759-220203 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 6f067bb9d2..7cc74553bd 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.759-220202" +pandora_version="7.0NG.759-220203" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index d3331fe249..ce31d7a0e9 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 = 'PC220202'; +$build_version = 'PC220203'; $pandora_version = 'v7.0NG.759'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 4c787abd84..6a32a6021b 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index b832a7e51c..c71a9e9082 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.759 -%define release 220202 +%define release 220203 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index f31e34d589..b5aae372e6 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.759 -%define release 220202 +%define release 220203 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index e5116ee74c..9d7b8fafd0 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.759" -PI_BUILD="220202" +PI_BUILD="220203" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index f342b2738c..eb9b07dea3 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.759 Build 220202"; +my $version = "7.0NG.759 Build 220203"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 29eda42575..d63faec7ce 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.759 Build 220202"; +my $version = "7.0NG.759 Build 220203"; # save program name for logging my $progname = basename($0); From 91d8a6d51f01843f612b243ad22a03d5470f3e6b Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Thu, 3 Feb 2022 08:11:21 +0100 Subject: [PATCH 15/15] Test the synchronization hook. --- pandora_agents/unix/README | 1 - 1 file changed, 1 deletion(-) diff --git a/pandora_agents/unix/README b/pandora_agents/unix/README index 3758fa31b7..fd05861db3 100644 --- a/pandora_agents/unix/README +++ b/pandora_agents/unix/README @@ -47,4 +47,3 @@ License The project is distributed under the GPL License v2 or later. Copyright (C) 2004-2011 Pandora FMS development team -