Merge remote-tracking branch 'origin/develop' into ent-9670-mejoras-automonitorizacion
This commit is contained in:
commit
0435a6998d
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
Copyright (c) 2005-2023 Pandora FMS
|
||||
Please see http://pandorafms.org for full contribution list
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
Copyright (c) 2005-2023 Pandora FMS
|
||||
Please see http://pandorafms.org for full contribution list
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
Copyright (c) 2005-2023 Pandora FMS
|
||||
Please see http://pandorafms.org for full contribution list
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
Copyright (c) 2005-2023 Pandora FMS
|
||||
Please see http://pandorafms.org for full contribution list
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Copyright (c) 2005-2023 Pandora FMS
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
Copyright (c) 2005-2023 Pandora FMS
|
||||
Please see http://pandorafms.org for full contribution list
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
Copyright (c) 2005-2023 Pandora FMS
|
||||
Please see http://pandorafms.org for full contribution list
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
Copyright (c) 2005-2023 Pandora FMS
|
||||
Please see http://pandorafms.org for full contribution list
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
Copyright (c) 2005-2023 Pandora FMS
|
||||
Please see http://pandorafms.org for full contribution list
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
Copyright (c) 2005-2023 Pandora FMS
|
||||
Please see http://pandorafms.org for full contribution list
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
Copyright (c) 2005-2023 Pandora FMS
|
||||
Please see http://pandorafms.org for full contribution list
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
Copyright (c) 2005-2023 Pandora FMS
|
||||
Please see http://pandorafms.org for full contribution list
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
Copyright (c) 2005-2023 Pandora FMS
|
||||
Please see http://pandorafms.org for full contribution list
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
Copyright (c) 2005-2023 Pandora FMS
|
||||
Please see http://pandorafms.org for full contribution list
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
Copyright (c) 2005-2023 Pandora FMS
|
||||
Please see http://pandorafms.org for full contribution list
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Copyright (c) 2005-2023 Pandora FMS
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Copyright (c) 2005-2023 Pandora FMS
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Copyright (c) 2005-2023 Pandora FMS
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Copyright (c) 2005-2023 Pandora FMS
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Copyright (c) 2005-2023 Pandora FMS
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Copyright (c) 2005-2023 Pandora FMS
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Copyright (c) 2005-2023 Pandora FMS
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Copyright (c) 2005-2023 Pandora FMS
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Copyright (c) 2005-2023 Pandora FMS
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Copyright (c) 2005-2023 Pandora FMS
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Copyright (c) 2005-2023 Pandora FMS
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Copyright (c) 2005-2023 Pandora FMS
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Copyright (c) 2005-2023 Pandora FMS
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Copyright (c) 2005-2023 Pandora FMS
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Copyright (c) 2005-2023 Pandora FMS
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Copyright (c) 2005-2023 Pandora FMS
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Copyright (c) 2005-2023 Pandora FMS
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
# Copyright (c) 2005-2009 Artica ST
|
||||
# Copyright (c) 2005-2023 Pandora FMS
|
||||
# Author: Sancho Lerena <slerena@artica.es> 2009
|
||||
# Licence: GPL2
|
||||
#
|
||||
|
|
|
@ -19,10 +19,10 @@ LOGFILE="/tmp/deploy-ext-db-$(date +%F).log"
|
|||
[ "$DBHOST" ] || DBHOST=127.0.0.1
|
||||
[ "$DBNAME" ] || DBNAME=pandora
|
||||
[ "$DBUSER" ] || DBUSER=pandora
|
||||
[ "$DBPASS" ] || DBPASS=pandora
|
||||
[ "$DBPASS" ] || DBPASS='Pandor4!'
|
||||
[ "$DBPORT" ] || DBPORT=3306
|
||||
[ "$DBROOTUSER" ] || DBROOTUSER=root
|
||||
[ "$DBROOTPASS" ] || DBROOTPASS=pandora
|
||||
[ "$DBROOTPASS" ] || DBROOTPASS='Pandor4!'
|
||||
[ "$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")
|
||||
|
@ -79,6 +79,53 @@ check_root_permissions () {
|
|||
fi
|
||||
}
|
||||
|
||||
# Function to check if a password meets the MySQL secure password requirements
|
||||
is_mysql_secure_password() {
|
||||
local password=$1
|
||||
|
||||
# Check password length (at least 8 characters)
|
||||
if [[ ${#password} -lt 8 ]]; then
|
||||
echo "Password length should be at least 8 characters."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one uppercase letter
|
||||
if [[ $password == ${password,,} ]]; then
|
||||
echo "Password should contain at least one uppercase letter."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one lowercase letter
|
||||
if [[ $password == ${password^^} ]]; then
|
||||
echo "Password should contain at least one lowercase letter."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one digit
|
||||
if ! [[ $password =~ [0-9] ]]; then
|
||||
echo "Password should contain at least one digit."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one special character
|
||||
if ! [[ $password =~ [[:punct:]] ]]; then
|
||||
echo "Password should contain at least one special character."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password is not a common pattern (e.g., "password", "123456")
|
||||
local common_patterns=("password" "123456" "qwerty")
|
||||
for pattern in "${common_patterns[@]}"; do
|
||||
if [[ $password == *"$pattern"* ]]; then
|
||||
echo "Password should not contain common patterns."
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
||||
# If all checks pass, the password is MySQL secure compliant
|
||||
return 0
|
||||
}
|
||||
|
||||
## Main
|
||||
echo "Starting PandoraFMS External DB deployment EL8 ver. $S_VERSION"
|
||||
|
||||
|
@ -128,6 +175,10 @@ execute_cmd "grep --version" 'Checking needed tools: grep'
|
|||
execute_cmd "sed --version" 'Checking needed tools: sed'
|
||||
execute_cmd "dnf --version" 'Checking needed tools: dnf'
|
||||
|
||||
#Check mysql pass
|
||||
execute_cmd "is_mysql_secure_password $DBROOTPASS" "Checking DBROOTPASS password match policy" 'This password do not match minimum MySQL policy requirements, more info in: https://dev.mysql.com/doc/refman/8.0/en/validate-password.html'
|
||||
execute_cmd "is_mysql_secure_password $DBPASS" "Checking DBPASS password match policy" 'This password do not match minimum MySQL policy requirements, more info in: https://dev.mysql.com/doc/refman/8.0/en/validate-password.html'
|
||||
|
||||
# Creating working directory
|
||||
rm -rf "$HOME"/pandora_deploy_tmp/*.rpm* &>> "$LOGFILE"
|
||||
mkdir "$HOME"/pandora_deploy_tmp &>> "$LOGFILE"
|
||||
|
@ -207,16 +258,12 @@ if [ "$SKIP_DATABASE_INSTALL" -eq '0' ] ; then
|
|||
export MYSQL_PWD=$(grep "temporary password" /var/log/mysqld.log | rev | cut -d' ' -f1 | rev)
|
||||
if [ "$MYVER" -eq '80' ] ; then
|
||||
echo """
|
||||
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = 'Pandor4!';
|
||||
UNINSTALL COMPONENT 'file://component_validate_password';
|
||||
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = '$DBROOTPASS';
|
||||
""" | mysql --connect-expired-password -u$DBROOTUSER &>> "$LOGFILE"
|
||||
fi
|
||||
|
||||
if [ "$MYVER" -ne '80' ] ; then
|
||||
echo """
|
||||
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = PASSWORD('Pandor4!');
|
||||
UNINSTALL PLUGIN validate_password;
|
||||
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = PASSWORD('$DBROOTPASS');
|
||||
""" | mysql --connect-expired-password -u$DBROOTUSER &>> "$LOGFILE"fi
|
||||
fi
|
||||
|
|
|
@ -26,9 +26,9 @@ rm -f $LOGFILE &> /dev/null # remove last log before start
|
|||
[ "$DBHOST" ] || DBHOST=127.0.0.1
|
||||
[ "$DBNAME" ] || DBNAME=pandora
|
||||
[ "$DBUSER" ] || DBUSER=pandora
|
||||
[ "$DBPASS" ] || DBPASS=pandora
|
||||
[ "$DBPASS" ] || DBPASS='Pandor4!'
|
||||
[ "$DBPORT" ] || DBPORT=3306
|
||||
[ "$DBROOTPASS" ] || DBROOTPASS=pandora
|
||||
[ "$DBROOTPASS" ] || DBROOTPASS='Pandor4!'
|
||||
[ "$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")
|
||||
|
@ -86,6 +86,53 @@ check_root_permissions () {
|
|||
fi
|
||||
}
|
||||
|
||||
# Function to check if a password meets the MySQL secure password requirements
|
||||
is_mysql_secure_password() {
|
||||
local password=$1
|
||||
|
||||
# Check password length (at least 8 characters)
|
||||
if [[ ${#password} -lt 8 ]]; then
|
||||
echo "Password length should be at least 8 characters."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one uppercase letter
|
||||
if [[ $password == ${password,,} ]]; then
|
||||
echo "Password should contain at least one uppercase letter."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one lowercase letter
|
||||
if [[ $password == ${password^^} ]]; then
|
||||
echo "Password should contain at least one lowercase letter."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one digit
|
||||
if ! [[ $password =~ [0-9] ]]; then
|
||||
echo "Password should contain at least one digit."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one special character
|
||||
if ! [[ $password =~ [[:punct:]] ]]; then
|
||||
echo "Password should contain at least one special character."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password is not a common pattern (e.g., "password", "123456")
|
||||
local common_patterns=("password" "123456" "qwerty")
|
||||
for pattern in "${common_patterns[@]}"; do
|
||||
if [[ $password == *"$pattern"* ]]; then
|
||||
echo "Password should not contain common patterns."
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
||||
# If all checks pass, the password is MySQL secure compliant
|
||||
return 0
|
||||
}
|
||||
|
||||
## Main
|
||||
echo "Starting PandoraFMS External DB deployment Ubuntu 22.04 ver. $S_VERSION"
|
||||
|
||||
|
@ -137,6 +184,10 @@ execute_cmd "grep --version" 'Checking needed tools: grep'
|
|||
execute_cmd "sed --version" 'Checking needed tools: sed'
|
||||
execute_cmd "apt --version" 'Checking needed tools: apt'
|
||||
|
||||
#Check mysql pass
|
||||
execute_cmd "is_mysql_secure_password $DBROOTPASS" "Checking DBROOTPASS password match policy" 'This password do not match minimum MySQL policy requirements, more info in: https://dev.mysql.com/doc/refman/8.0/en/validate-password.html'
|
||||
execute_cmd "is_mysql_secure_password $DBPASS" "Checking DBPASS password match policy" 'This password do not match minimum MySQL policy requirements, more info in: https://dev.mysql.com/doc/refman/8.0/en/validate-password.html'
|
||||
|
||||
# Creating working directory
|
||||
rm -rf "$WORKDIR" &>> "$LOGFILE"
|
||||
mkdir -p "$WORKDIR" &>> "$LOGFILE"
|
||||
|
@ -170,6 +221,7 @@ if [ "$SKIP_DATABASE_INSTALL" -eq '0' ] ; then
|
|||
""" | mysql -uroot &>> "$LOGFILE"
|
||||
|
||||
export MYSQL_PWD=$DBROOTPASS
|
||||
echo "INSTALL COMPONENT 'file://component_validate_password';" | mysql -uroot -P$DBPORT -h$DBHOST &>> "$LOGFILE"
|
||||
echo -en "${cyan}Creating Pandora FMS database...${reset}"
|
||||
echo "create database $DBNAME" | mysql -uroot -P$DBPORT -h$DBHOST
|
||||
check_cmd_status "Error creating database $DBNAME, is this an empty node? if you have a previus installation please contact with support."
|
||||
|
|
|
@ -78,16 +78,16 @@ cd unix && ./pandora_agent_installer --install
|
|||
}
|
||||
|
||||
|
||||
install_autodiscover () {
|
||||
local arch=$1
|
||||
wget http://firefly.pandorafms.com/projects/autodiscover-linux.zip
|
||||
unzip autodiscover-linux.zip
|
||||
chmod +x $arch/autodiscover
|
||||
mv -f $arch/autodiscover /etc/pandora/plugins/autodiscover
|
||||
}
|
||||
# install_autodiscover () {
|
||||
# local arch=$1
|
||||
# wget http://firefly.pandorafms.com/projects/autodiscover-linux.zip
|
||||
# unzip autodiscover-linux.zip
|
||||
# chmod +x $arch/autodiscover
|
||||
# mv -f $arch/autodiscover /etc/pandora/plugins/autodiscover
|
||||
# }
|
||||
|
||||
## Main
|
||||
echo "Starting PandoraFMS Agent deployment ver. $S_VERSION"
|
||||
echo "Starting PandoraFMS Agent binary deployment ver. $S_VERSION"
|
||||
|
||||
execute_cmd "[ $PANDORA_SERVER_IP ]" 'Check Server IP Address' 'Please define env variable PANDORA_SERVER_IP'
|
||||
|
||||
|
@ -104,8 +104,6 @@ OS=$([[ $(grep '^ID_LIKE=' /etc/os-release) ]] && grep ^ID_LIKE= /etc/os-release
|
|||
[[ $OS =~ 'rhel' ]] && OS_RELEASE=$OS
|
||||
[[ $OS =~ 'fedora' ]] && OS_RELEASE=$OS
|
||||
[[ $OS =~ 'debian' ]] && OS_RELEASE=$OS
|
||||
#[[ $OS == 'rhel fedora' ]] && OS_RELEASE=$OS
|
||||
#[[ $OS == 'centos rhel fedora' ]] && OS_RELEASE=$OS
|
||||
|
||||
# initialice logfile
|
||||
execute_cmd "echo 'Starting community deployment' > $LOGFILE" "All installer activity is logged on $LOGFILE"
|
||||
|
@ -126,6 +124,30 @@ check_repo_connection
|
|||
execute_cmd "grep --version" 'Checking needed tools: grep'
|
||||
execute_cmd "sed --version" 'Checking needed tools: sed'
|
||||
|
||||
# Arch check
|
||||
arch=$(uname -m)
|
||||
case $arch in
|
||||
|
||||
x86_64)
|
||||
echo -e "${cyan}Arch: $arch ${reset} "
|
||||
;;
|
||||
|
||||
x86)
|
||||
echo -e "${yellow}Skiping installation arch: $arch not suported by binary agent please consider to install source agent${reset}"
|
||||
exit -1
|
||||
;;
|
||||
|
||||
armv7l)
|
||||
echo -e "${yellow}Skiping installation arch: $arch not suported by binary agent please consider to install source agent${reset}"
|
||||
exit -1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo -e "${yellow}Skiping installation arch: $arch not suported by binary agent please consider to install source agent${reset}"
|
||||
exit -1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Creating working directory
|
||||
rm -rf $HOME/pandora_deploy_tmp/ &>> $LOGFILE
|
||||
mkdir $HOME/pandora_deploy_tmp &>> $LOGFILE
|
||||
|
@ -148,6 +170,10 @@ if [[ $OS_RELEASE =~ 'rhel' ]] || [[ $OS_RELEASE =~ 'fedora' ]]; then
|
|||
# Check rh version
|
||||
if [ $(sed -nr 's/VERSION_ID+=\s*"([0-9]).*"$/\1/p' /etc/os-release) -eq '8' ] ; then
|
||||
package_manager_cmd=dnf
|
||||
execute_cmd "$package_manager_cmd install -y libnsl" "Installing dependencies"
|
||||
elif [ $(sed -nr 's/VERSION_ID+=\s*"([0-9]).*"$/\1/p' /etc/os-release) -eq '9' ] ; then
|
||||
package_manager_cmd=dnf
|
||||
execute_cmd "$package_manager_cmd install -y libnsl libxcrypt-compat" "Installing dependencies"
|
||||
elif [ $(sed -nr 's/VERSION_ID+=\s*"([0-9]).*"$/\1/p' /etc/os-release) -eq '7' ] ; then
|
||||
package_manager_cmd=yum
|
||||
|
||||
|
@ -158,24 +184,23 @@ if [[ $OS_RELEASE =~ 'rhel' ]] || [[ $OS_RELEASE =~ 'fedora' ]]; then
|
|||
echo -e "${cyan}Installing agent dependencies...${reset}" ${green}OK${reset}
|
||||
|
||||
# Insatall pandora agent
|
||||
$package_manager_cmd install -y http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm &>> $LOGFILE
|
||||
echo -en "${cyan}Installing Pandora FMS agent...${reset}"
|
||||
check_cmd_status 'Error installing Pandora FMS agent'
|
||||
[[ $PANDORA_AGENT_SSL ]] && execute_cmd "$package_manager_cmd install -y perl-IO-Socket-SSL" "Installing SSL libraries for encrypted connection"
|
||||
[ "$PANDORA_AGENT_PACKAGE_EL" ] || PANDORA_AGENT_PACKAGE_EL="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux_bin-7.0NG.x86_64.rpm "
|
||||
execute_cmd "$package_manager_cmd install -y ${PANDORA_AGENT_PACKAGE_EL}" 'Installing Pandora FMS agent package'
|
||||
#[[ $PANDORA_AGENT_SSL ]] && execute_cmd "$package_manager_cmd install -y perl-IO-Socket-SSL" "Installing SSL libraries for encrypted connection"
|
||||
|
||||
fi
|
||||
|
||||
if [[ $OS_RELEASE == 'debian' ]]; then
|
||||
[ "$PANDORA_AGENT_PACKAGE_UBUNTU" ] || PANDORA_AGENT_PACKAGE_UBUNTU='https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG_x86_64.tar.gz'
|
||||
execute_cmd "apt update" 'Updating repos'
|
||||
execute_cmd "apt install -y perl wget curl unzip procps python3 python3-pip" 'Installing agent dependencies'
|
||||
execute_cmd 'wget http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz' 'Downloading Pandora FMS agent package'
|
||||
execute_cmd "apt install -y perl wget curl unzip procps python3 python3-pip" 'Installing agent dependencies'
|
||||
execute_cmd "curl --output pandorafms_agent_linux-7.0NG.tar.gz ${PANDORA_AGENT_PACKAGE_UBUNTU}" 'Downloading Pandora FMS agent package'
|
||||
execute_cmd 'install_tarball pandorafms_agent_linux-7.0NG.tar.gz' 'Installing Pandora FMS agent'
|
||||
[[ $PANDORA_AGENT_SSL ]] && execute_cmd 'apt install -y libio-socket-ssl-perl' "Installing SSL libraries for encrypted connection"
|
||||
#[[ $PANDORA_AGENT_SSL ]] && execute_cmd 'apt install -y libio-socket-ssl-perl' "Installing SSL libraries for encrypted connection"
|
||||
cd $HOME/pandora_deploy_tmp
|
||||
fi
|
||||
|
||||
# Configuring Agente
|
||||
|
||||
[[ $PANDORA_SERVER_IP ]] && sed -i "s/^server_ip.*$/server_ip $PANDORA_SERVER_IP/g" $PANDORA_AGENT_CONF
|
||||
[[ $PANDORA_REMOTE_CONFIG ]] && sed -i "s/^remote_config.*$/remote_config $PANDORA_REMOTE_CONFIG/g" $PANDORA_AGENT_CONF
|
||||
[[ $PANDORA_GROUP ]] && sed -i "s/^group.*$/group $PANDORA_GROUP/g" $PANDORA_AGENT_CONF
|
||||
|
@ -187,27 +212,6 @@ fi
|
|||
[[ $PANDORA_AGENT_SSL ]] && sed -i "s/^#server_ssl.*$/server_ssl $PANDORA_AGENT_SSL/g" $PANDORA_AGENT_CONF
|
||||
|
||||
|
||||
#installing autodiscover
|
||||
|
||||
arch=$(uname -m)
|
||||
case $arch in
|
||||
|
||||
x86_64)
|
||||
execute_cmd 'install_autodiscover x86_64' "installing service autodiscover on $arch" 'Error unable to install autodiscovery'
|
||||
;;
|
||||
|
||||
x86)
|
||||
execute_cmd 'install_autodiscover x84' "installing service autodiscover on $arch" 'Error unable to install autodiscovery'
|
||||
;;
|
||||
|
||||
armv7l)
|
||||
echo -e "${cyan}Skiping autodiscover installation arch $arch not suported${reset}"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo -e "${yellow}Skiping autodiscover installation arch $arch not suported${reset}"
|
||||
;;
|
||||
esac
|
||||
|
||||
#Starting pandora agent daemon.
|
||||
execute_cmd '/etc/init.d/pandora_agent_daemon restart' 'Starting Pandora Agent'
|
||||
|
|
|
@ -11,7 +11,7 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
|
|||
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
||||
|
||||
|
||||
S_VERSION='2023050901'
|
||||
S_VERSION='2023062901'
|
||||
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
||||
|
||||
# define default variables
|
||||
|
@ -82,7 +82,7 @@ check_pre_pandora () {
|
|||
export MYSQL_PWD=$DBPASS
|
||||
|
||||
echo -en "${cyan}Checking environment ... ${reset}"
|
||||
rpm -qa | grep 'pandorafms_' &>> /dev/null && local fail=true
|
||||
rpm -qa | grep 'pandorafms_' | grep -v pandorafms_agent_* | grep -v "pandorawmic" &>> /dev/null && 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
|
||||
|
@ -285,8 +285,7 @@ console_dependencies=" \
|
|||
mod_ssl \
|
||||
libzstd \
|
||||
openldap-clients \
|
||||
chromium \
|
||||
http://firefly.pandorafms.com/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
|
||||
chromium"
|
||||
execute_cmd "yum install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
|
||||
|
||||
# Server dependencies
|
||||
|
@ -313,7 +312,6 @@ server_dependencies=" \
|
|||
bind-utils \
|
||||
whois \
|
||||
cpanminus \
|
||||
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \
|
||||
http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm \
|
||||
https://firefly.pandorafms.com/centos7/pandorawmic-1.0.0-1.x86_64.rpm"
|
||||
execute_cmd "yum install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
|
||||
|
@ -341,7 +339,6 @@ execute_cmd "yum install -y $oracle_dependencies || yum reinstall -y $oracle_dep
|
|||
|
||||
#ipam dependencies
|
||||
ipam_dependencies=" \
|
||||
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \
|
||||
perl(NetAddr::IP) \
|
||||
perl(Sys::Syslog) \
|
||||
perl(DBI) \
|
||||
|
@ -719,6 +716,9 @@ echo "* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cro
|
|||
systemctl enable pandora_agent_daemon &>> $LOGFILE
|
||||
execute_cmd "systemctl start pandora_agent_daemon" "Starting Pandora FMS Agent"
|
||||
|
||||
# Enable postrix
|
||||
systemctl enable postfix --now &>> "$LOGFILE"
|
||||
|
||||
#SSH banner
|
||||
[ "$(curl -s ifconfig.me)" ] && ipplublic=$(curl -s ifconfig.me)
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
|
|||
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
||||
|
||||
|
||||
S_VERSION='2023050901'
|
||||
S_VERSION='2023062901'
|
||||
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
||||
|
||||
# define default variables
|
||||
|
@ -24,10 +24,10 @@ LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
|||
[ "$DBHOST" ] || DBHOST=127.0.0.1
|
||||
[ "$DBNAME" ] || DBNAME=pandora
|
||||
[ "$DBUSER" ] || DBUSER=pandora
|
||||
[ "$DBPASS" ] || DBPASS=pandora
|
||||
[ "$DBPASS" ] || DBPASS='Pandor4!'
|
||||
[ "$DBPORT" ] || DBPORT=3306
|
||||
[ "$DBROOTUSER" ] || DBROOTUSER=root
|
||||
[ "$DBROOTPASS" ] || DBROOTPASS=pandora
|
||||
[ "$DBROOTPASS" ] || DBROOTPASS='Pandor4!'
|
||||
[ "$SKIP_PRECHECK" ] || SKIP_PRECHECK=0
|
||||
[ "$SKIP_DATABASE_INSTALL" ] || SKIP_DATABASE_INSTALL=0
|
||||
[ "$SKIP_KERNEL_OPTIMIZATIONS" ] || SKIP_KERNEL_OPTIMIZATIONS=0
|
||||
|
@ -84,7 +84,7 @@ check_cmd_status () {
|
|||
check_pre_pandora () {
|
||||
|
||||
echo -en "${cyan}Checking environment ... ${reset}"
|
||||
rpm -qa | grep -v "pandorawmic" | grep 'pandorafms_' &>> /dev/null && local fail=true
|
||||
rpm -qa | grep 'pandorafms_' | grep -v pandorafms_agent_* | grep -v "pandorawmic" &>> /dev/null && local fail=true
|
||||
[ -d "$PANDORA_CONSOLE" ] && local fail=true
|
||||
[ -f /usr/bin/pandora_server ] && local fail=true
|
||||
|
||||
|
@ -125,6 +125,52 @@ installing_docker () {
|
|||
echo "End installig docker" &>> "$LOGFILE"
|
||||
}
|
||||
|
||||
# Function to check if a password meets the MySQL secure password requirements
|
||||
is_mysql_secure_password() {
|
||||
local password=$1
|
||||
|
||||
# Check password length (at least 8 characters)
|
||||
if [[ ${#password} -lt 8 ]]; then
|
||||
echo "Password length should be at least 8 characters."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one uppercase letter
|
||||
if [[ $password == ${password,,} ]]; then
|
||||
echo "Password should contain at least one uppercase letter."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one lowercase letter
|
||||
if [[ $password == ${password^^} ]]; then
|
||||
echo "Password should contain at least one lowercase letter."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one digit
|
||||
if ! [[ $password =~ [0-9] ]]; then
|
||||
echo "Password should contain at least one digit."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one special character
|
||||
if ! [[ $password =~ [[:punct:]] ]]; then
|
||||
echo "Password should contain at least one special character."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password is not a common pattern (e.g., "password", "123456")
|
||||
local common_patterns=("password" "123456" "qwerty")
|
||||
for pattern in "${common_patterns[@]}"; do
|
||||
if [[ $password == *"$pattern"* ]]; then
|
||||
echo "Password should not contain common patterns."
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
||||
# If all checks pass, the password is MySQL secure compliant
|
||||
return 0
|
||||
}
|
||||
|
||||
## Main
|
||||
echo "Starting PandoraFMS Community deployment EL8 ver. $S_VERSION"
|
||||
|
@ -189,6 +235,10 @@ execute_cmd "grep --version" 'Checking needed tools: grep'
|
|||
execute_cmd "sed --version" 'Checking needed tools: sed'
|
||||
execute_cmd "dnf --version" 'Checking needed tools: dnf'
|
||||
|
||||
#Check mysql pass
|
||||
execute_cmd "is_mysql_secure_password $DBROOTPASS" "Checking DBROOTPASS password match policy" 'This password do not match minimum MySQL policy requirements, more info in: https://dev.mysql.com/doc/refman/8.0/en/validate-password.html'
|
||||
execute_cmd "is_mysql_secure_password $DBPASS" "Checking DBPASS password match policy" 'This password do not match minimum MySQL policy requirements, more info in: https://dev.mysql.com/doc/refman/8.0/en/validate-password.html'
|
||||
|
||||
# Creating working directory
|
||||
rm -rf "$HOME"/pandora_deploy_tmp/*.rpm* &>> "$LOGFILE"
|
||||
mkdir "$HOME"/pandora_deploy_tmp &>> "$LOGFILE"
|
||||
|
@ -344,8 +394,7 @@ console_dependencies=" \
|
|||
http://firefly.pandorafms.com/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \
|
||||
http://firefly.pandorafms.com/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \
|
||||
http://firefly.pandorafms.com/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
|
||||
http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm \
|
||||
http://firefly.pandorafms.com/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
|
||||
http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm"
|
||||
execute_cmd "dnf install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
|
||||
|
||||
# Server dependencies
|
||||
|
@ -371,7 +420,7 @@ server_dependencies=" \
|
|||
java \
|
||||
bind-utils \
|
||||
whois \
|
||||
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \
|
||||
libnsl \
|
||||
http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm \
|
||||
https://firefly.pandorafms.com/centos8/pandorawmic-1.0.0-1.x86_64.rpm"
|
||||
execute_cmd "dnf install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
|
||||
|
@ -399,7 +448,6 @@ execute_cmd "dnf install -y $oracle_dependencies" "Installing Oracle Instant cli
|
|||
|
||||
#ipam dependencies
|
||||
ipam_dependencies=" \
|
||||
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \
|
||||
perl(NetAddr::IP) \
|
||||
perl(Sys::Syslog) \
|
||||
perl(DBI) \
|
||||
|
@ -439,7 +487,6 @@ if [ "$SKIP_DATABASE_INSTALL" -eq '0' ] ; then
|
|||
if [ "$MYVER" -eq '80' ] ; then
|
||||
echo """
|
||||
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = 'Pandor4!';
|
||||
UNINSTALL COMPONENT 'file://component_validate_password';
|
||||
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = '$DBROOTPASS';
|
||||
""" | mysql --connect-expired-password -u$DBROOTUSER &>> "$LOGFILE"
|
||||
fi
|
||||
|
@ -447,7 +494,6 @@ if [ "$SKIP_DATABASE_INSTALL" -eq '0' ] ; then
|
|||
if [ "$MYVER" -ne '80' ] ; then
|
||||
echo """
|
||||
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = PASSWORD('Pandor4!');
|
||||
UNINSTALL PLUGIN validate_password;
|
||||
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = PASSWORD('$DBROOTPASS');
|
||||
""" | mysql --connect-expired-password -u$DBROOTUSER &>> "$LOGFILE"fi
|
||||
fi
|
||||
|
@ -622,8 +668,9 @@ sed -i -e "s/^upload_max_filesize.*/upload_max_filesize = 800M/g" /etc/php.ini
|
|||
sed -i -e "s/^memory_limit.*/memory_limit = 800M/g" /etc/php.ini
|
||||
sed -i -e "s/.*post_max_size =.*/post_max_size = 800M/" /etc/php.ini
|
||||
|
||||
#adding 900s to httpd timeout
|
||||
#adding 900s to httpd timeout and 300 to ProxyTimeout
|
||||
echo 'TimeOut 900' > /etc/httpd/conf.d/timeout.conf
|
||||
echo 'ProxyTimeout 300' >> /etc/httpd/conf.d/timeout.conf
|
||||
|
||||
cat > /var/www/html/index.html << EOF_INDEX
|
||||
<meta HTTP-EQUIV="REFRESH" content="0; url=/pandora_console/">
|
||||
|
@ -787,6 +834,9 @@ echo "* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cro
|
|||
systemctl enable pandora_agent_daemon &>> "$LOGFILE"
|
||||
execute_cmd "systemctl start pandora_agent_daemon" "Starting Pandora FMS Agent"
|
||||
|
||||
# Enable postfix
|
||||
systemctl enable postfix --now &>> "$LOGFILE"
|
||||
|
||||
#SSH banner
|
||||
[ "$(curl -s ifconfig.me)" ] && ipplublic=$(curl -s ifconfig.me)
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
|||
WORKDIR=/opt/pandora/deploy
|
||||
|
||||
|
||||
S_VERSION='2023050901'
|
||||
S_VERSION='2023062901'
|
||||
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
||||
rm -f $LOGFILE &> /dev/null # remove last log before start
|
||||
|
||||
|
@ -27,9 +27,9 @@ rm -f $LOGFILE &> /dev/null # remove last log before start
|
|||
[ "$DBHOST" ] || DBHOST=127.0.0.1
|
||||
[ "$DBNAME" ] || DBNAME=pandora
|
||||
[ "$DBUSER" ] || DBUSER=pandora
|
||||
[ "$DBPASS" ] || DBPASS=pandora
|
||||
[ "$DBPASS" ] || DBPASS='Pandor4!'
|
||||
[ "$DBPORT" ] || DBPORT=3306
|
||||
[ "$DBROOTPASS" ] || DBROOTPASS=pandora
|
||||
[ "$DBROOTPASS" ] || DBROOTPASS='Pandor4!'
|
||||
[ "$SKIP_PRECHECK" ] || SKIP_PRECHECK=0
|
||||
[ "$SKIP_DATABASE_INSTALL" ] || SKIP_DATABASE_INSTALL=0
|
||||
[ "$SKIP_KERNEL_OPTIMIZATIONS" ] || SKIP_KERNEL_OPTIMIZATIONS=0
|
||||
|
@ -113,6 +113,53 @@ check_root_permissions () {
|
|||
fi
|
||||
}
|
||||
|
||||
# Function to check if a password meets the MySQL secure password requirements
|
||||
is_mysql_secure_password() {
|
||||
local password=$1
|
||||
|
||||
# Check password length (at least 8 characters)
|
||||
if [[ ${#password} -lt 8 ]]; then
|
||||
echo "Password length should be at least 8 characters."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one uppercase letter
|
||||
if [[ $password == ${password,,} ]]; then
|
||||
echo "Password should contain at least one uppercase letter."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one lowercase letter
|
||||
if [[ $password == ${password^^} ]]; then
|
||||
echo "Password should contain at least one lowercase letter."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one digit
|
||||
if ! [[ $password =~ [0-9] ]]; then
|
||||
echo "Password should contain at least one digit."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one special character
|
||||
if ! [[ $password =~ [[:punct:]] ]]; then
|
||||
echo "Password should contain at least one special character."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password is not a common pattern (e.g., "password", "123456")
|
||||
local common_patterns=("password" "123456" "qwerty")
|
||||
for pattern in "${common_patterns[@]}"; do
|
||||
if [[ $password == *"$pattern"* ]]; then
|
||||
echo "Password should not contain common patterns."
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
||||
# If all checks pass, the password is MySQL secure compliant
|
||||
return 0
|
||||
}
|
||||
|
||||
installing_docker () {
|
||||
#Installing docker for debug
|
||||
echo "Start installig docker" &>> "$LOGFILE"
|
||||
|
@ -194,6 +241,10 @@ execute_cmd "grep --version" 'Checking needed tools: grep'
|
|||
execute_cmd "sed --version" 'Checking needed tools: sed'
|
||||
execute_cmd "apt --version" 'Checking needed tools: apt'
|
||||
|
||||
#Check mysql pass
|
||||
execute_cmd "is_mysql_secure_password $DBROOTPASS" "Checking DBROOTPASS password match policy" 'This password do not match minimum MySQL policy requirements, more info in: https://dev.mysql.com/doc/refman/8.0/en/validate-password.html'
|
||||
execute_cmd "is_mysql_secure_password $DBPASS" "Checking DBPASS password match policy" 'This password do not match minimum MySQL policy requirements, more info in: https://dev.mysql.com/doc/refman/8.0/en/validate-password.html'
|
||||
|
||||
# Creating working directory
|
||||
rm -rf "$WORKDIR" &>> "$LOGFILE"
|
||||
mkdir -p "$WORKDIR" &>> "$LOGFILE"
|
||||
|
@ -265,7 +316,6 @@ server_dependencies=" \
|
|||
openssh-client \
|
||||
postfix \
|
||||
unzip \
|
||||
xprobe \
|
||||
coreutils \
|
||||
libio-compress-perl \
|
||||
libmoosex-role-timer-perl \
|
||||
|
@ -287,6 +337,8 @@ server_dependencies=" \
|
|||
libgeo-ip-perl \
|
||||
arping \
|
||||
snmp-mibs-downloader \
|
||||
snmptrapd \
|
||||
libnsl2 \
|
||||
openjdk-8-jdk "
|
||||
execute_cmd "apt install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
|
||||
|
||||
|
@ -299,17 +351,7 @@ echo -en "${cyan}Installing wmic and pandorawmic...${reset}"
|
|||
chmod +x pandorawmic wmic &>> "$LOGFILE" && \
|
||||
cp -a wmic /usr/bin/ &>> "$LOGFILE" && \
|
||||
cp -a pandorawmic /usr/bin/ &>> "$LOGFILE"
|
||||
check_cmd_status "Error Installing phanromjs"
|
||||
|
||||
# phantomjs
|
||||
echo -en "${cyan}Installing phantomjs...${reset}"
|
||||
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
|
||||
export OPENSSL_CONF=/etc/ssl
|
||||
curl -LSs -O "https://firefly.pandorafms.com/pandorafms/utils/$PHANTOM_JS.tar.bz2" &>> "$LOGFILE" && \
|
||||
tar xvjf "$PHANTOM_JS.tar.bz2" &>> "$LOGFILE" && \
|
||||
mv $PHANTOM_JS/bin/phantomjs /usr/bin &>> "$LOGFILE" && \
|
||||
/usr/bin/phantomjs --version &>> "$LOGFILE"
|
||||
check_cmd_status "Error Installing phanromjs"
|
||||
check_cmd_status "Error Installing pandorawmic/wmic"
|
||||
|
||||
# create symlink for fping
|
||||
rm -f /usr/sbin/fping &>> "$LOGFILE"
|
||||
|
@ -370,7 +412,6 @@ source '/root/.profile' &>> "$LOGFILE"
|
|||
|
||||
#ipam dependencies
|
||||
ipam_dependencies=" \
|
||||
xprobe \
|
||||
libnetaddr-ip-perl \
|
||||
coreutils \
|
||||
libdbd-mysql-perl \
|
||||
|
@ -413,6 +454,7 @@ if [ "$SKIP_DATABASE_INSTALL" -eq '0' ] ; then
|
|||
""" | mysql -uroot &>> "$LOGFILE"
|
||||
|
||||
export MYSQL_PWD=$DBROOTPASS
|
||||
echo "INSTALL COMPONENT 'file://component_validate_password';" | mysql -uroot -P$DBPORT -h$DBHOST &>> "$LOGFILE"
|
||||
echo -en "${cyan}Creating Pandora FMS database...${reset}"
|
||||
echo "create database $DBNAME" | mysql -uroot -P$DBPORT -h$DBHOST
|
||||
check_cmd_status "Error creating database $DBNAME, is this an empty node? if you have a previus installation please contact with support."
|
||||
|
@ -619,8 +661,9 @@ sed --follow-symlinks -i -e "s/^memory_limit.*/memory_limit = 800M/g" /etc/php.i
|
|||
sed --follow-symlinks -i -e "s/.*post_max_size =.*/post_max_size = 800M/" /etc/php.ini
|
||||
sed --follow-symlinks -i -e "s/^disable_functions/;disable_functions/" /etc/php.ini
|
||||
|
||||
#adding 900s to httpd timeout
|
||||
#echo 'TimeOut 900' > /etc/httpd/conf.d/timeout.conf
|
||||
#adding 900s to httpd timeout and 300 to ProxyTimeout
|
||||
echo 'TimeOut 900' > /etc/apache2/conf-enabled/timeout.conf
|
||||
echo 'ProxyTimeout 300' >> /etc/apache2/conf-enabled/timeout.conf
|
||||
|
||||
cat > /var/www/html/index.html << EOF_INDEX
|
||||
<meta HTTP-EQUIV="REFRESH" content="0; url=/pandora_console/">
|
||||
|
@ -792,6 +835,13 @@ systemctl enable pandora_agent_daemon &>> "$LOGFILE"
|
|||
#fix path phantomjs
|
||||
sed --follow-symlinks -i -e "s/^openssl_conf = openssl_init/#openssl_conf = openssl_init/g" /etc/ssl/openssl.cnf &>> "$LOGFILE"
|
||||
|
||||
# Enable postfix
|
||||
systemctl enable postfix --now &>> "$LOGFILE"
|
||||
|
||||
# Disable snmptrapd
|
||||
systemctl disable --now snmptrapd &>> "$LOGFILE"
|
||||
systemctl disable --now snmptrapd.socket &>> "$LOGFILE"
|
||||
|
||||
#SSH banner
|
||||
[ "$(curl -s ifconfig.me)" ] && ipplublic=$(curl -s ifconfig.me)
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ services:
|
|||
PUBLICURL: ""
|
||||
SLEEP: 5
|
||||
RETRIES: 10
|
||||
TZ: 'Europe/Madrid'
|
||||
networks:
|
||||
- pandora
|
||||
ports:
|
||||
|
|
|
@ -10,6 +10,8 @@ ENV DBPORT=3306
|
|||
ENV SLEEP=5
|
||||
ENV RETRIES=1
|
||||
ENV OPEN=1
|
||||
ENV TZ='Europe/Madrid'
|
||||
|
||||
|
||||
ENV LC_ALL=C
|
||||
|
||||
|
|
|
@ -230,6 +230,10 @@ fi
|
|||
echo "" > /opt/pandora/crontasks || touch /opt/pandora/crontasks
|
||||
|
||||
|
||||
#set localtime
|
||||
rm -rf /etc/localtime
|
||||
ln -s /usr/share/zoneinfo/$TZ /etc/localtime
|
||||
|
||||
#install pandora packages
|
||||
echo "-> Istalling pandorafms"
|
||||
cd /opt/pandora
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# **********************************************************************
|
||||
# Generic Daemon launcher for Unix (AIX, HP-UX, SunOS, Linux)
|
||||
# (c) 2008-2009 Artica ST
|
||||
# (c) 2008-2023 Pandora FMS
|
||||
# (c) 2008-2009 Sancho Lerena <slerena@gmail.com>
|
||||
# This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
|
|
@ -28,6 +28,7 @@ $PANDHOME_ENT/pandora_server/PandoraFMS-Enterprise/pandora_server_enterprise.spe
|
|||
$CODEHOME/pandora_console/pandora_console.redhat.spec \
|
||||
$CODEHOME/pandora_console/pandora_console.rhel7.spec \
|
||||
$CODEHOME/pandora_agents/unix/pandora_agent.redhat.spec \
|
||||
$CODEHOME/pandora_agents/unix/pandora_agent.redhat_bin.spec \
|
||||
$CODEHOME/pandora_server/pandora_server.redhat.spec \
|
||||
$PANDHOME_ENT/pandora_agents/pandora_agent.spec \
|
||||
$PANDHOME_ENT/pandora_server/pandora_server_enterprise.redhat.spec \
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Pandora FMS Mail Transfer
|
||||
# This is a tool for transfering Pandora FMS data files by mail (SMTP/POP)
|
||||
##########################################################################
|
||||
# Copyright (c) 2011-2021 Artica Soluciones Tecnologicas S.L
|
||||
# Copyright (c) 2011-2023 Pandora FMS
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
|
|
|
@ -3,7 +3,7 @@ Pandora Mail Transfer
|
|||
|
||||
1st Edition , 3 May 2011
|
||||
|
||||
(c) Artica Soluciones Tecnológicas 2005-2011
|
||||
(c) Pandora FMS 2005-2023
|
||||
(c) Juan Manuel Ramon <juanma@artica.es>
|
||||
(c) Javier Lanz <javier.lanz@artica.es>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl
|
||||
# Pandora FMS Agent Plugin for SunONE
|
||||
# (c) Artica Soluciones Tecnologicas <info@artica.es> 2011
|
||||
# (c) Pandora FMS <info@pandorafms.com> 2011
|
||||
# v2, 1 Sep 2011
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (C) 2011 Artica ST http://artica.es
|
||||
Copyright (C) 2011-2023 Pandora FMS https://pandorafms.com
|
||||
Copyright (C) 2011 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
Build and link Pandora FMS Embedded Agent
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Pandora FMS Embedded Agent
|
||||
// (c) Artica Soluciones Tecnológicas S.L 2011
|
||||
// (c) Pandora FMS 2011-2023
|
||||
// (c) Sancho Lerena <slerena@artica.es>
|
||||
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Pandora FMS Embedded Agent
|
||||
// (c) Artica Soluciones Tecnológicas S.L 2011
|
||||
// (c) Pandora FMS 2011-2023
|
||||
// (c) Sancho Lerena <slerena@artica.es>
|
||||
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Pandora FMS Embedded Agent
|
||||
// (c) Artica Soluciones Tecnológicas S.L 2011
|
||||
// (c) Pandora FMS 2011-2023
|
||||
// (c) Sancho Lerena <slerena@artica.es>
|
||||
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Pandora FMS Embedded Agent
|
||||
// (c) Artica Soluciones Tecnológicas S.L 2011
|
||||
// (c) Pandora FMS 2011-2023
|
||||
// (c) Sancho Lerena <slerena@artica.es>
|
||||
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Pandora FMS Embedded Agent
|
||||
// (c) Artica Soluciones Tecnológicas S.L 2011
|
||||
// (c) Pandora FMS 2011-2023
|
||||
// (c) Sancho Lerena <slerena@artica.es>
|
||||
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Pandora FMS Embedded Agent
|
||||
// (c) Artica Soluciones Tecnológicas S.L 2011
|
||||
// (c) Pandora FMS 2011-2023
|
||||
// (c) Sancho Lerena <slerena@artica.es>
|
||||
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Pandora FMS Embedded Agent, startup script
|
||||
# Copyright (c) 2011 Artica ST, <info@artica.es>
|
||||
# Copyright (c) 2011-2023 Pandora FMS, <info@pandorafms.com>
|
||||
# Tested on Busybox 1.13
|
||||
# v4.0 Build 110122
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Pandora FMS Embedded Agent Installer (c) 2011 Artica ST
|
||||
# Pandora FMS Embedded Agent Installer (c) 2011-2023 Pandora FMS
|
||||
# Embedded Version (generic), for Busybox enviroments only
|
||||
# Please see http://www.pandorafms.org
|
||||
# v4.0 Build 110121
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772, AIX version
|
||||
# Version 7.0NG.773.3, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# Copyright (c) 2003-2023 Pandora FMS
|
||||
# http://www.pandorafms.com
|
||||
|
||||
# General Parameters
|
||||
|
|
|
@ -4,7 +4,7 @@ Architecture: all
|
|||
Priority: optional
|
||||
Section: admin
|
||||
Installed-Size: 260
|
||||
Maintainer: ÁRTICA ST <info@artica.es>
|
||||
Maintainer: Pandora FMS <info@pandorafms.com>
|
||||
Homepage: https://pandorafms.org/
|
||||
Depends: coreutils, perl, unzip
|
||||
Description: Pandora FMS agents are based on native languages in every platform: scripts that can be written in any language. It’s possible to reproduce any agent in any programming language and can be extended without difficulty the existing ones in order to cover aspects not taken into account up to the moment. These scripts are formed by modules that each one gathers a "chunk" of information. Thus, every agent gathers several "chunks" of information; this one is organized in a data set and stored in a single file, called data file.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#Pandora FMS- http:#pandorafms.com
|
||||
# ==================================================
|
||||
# Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
# Copyright (c) 2005-2023 Pandora FMS
|
||||
# Please see http:#pandorafms.org for full contribution list
|
||||
|
||||
# This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772, FreeBSD Version
|
||||
# Version 7.0NG.773.3, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# Copyright (c) 2003-2023 Pandora FMS
|
||||
# http://www.pandorafms.com
|
||||
|
||||
# General Parameters
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772, HP-UX Version
|
||||
# Version 7.0NG.773.3, HP-UX Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# Copyright (c) 2003-2023 Pandora FMS
|
||||
# http://www.pandorafms.com
|
||||
|
||||
# General Parameters
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772, GNU/Linux
|
||||
# Version 7.0NG.773.3, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# Copyright (c) 2003-2023 Pandora FMS
|
||||
# http://www.pandorafms.com
|
||||
|
||||
# General Parameters
|
||||
|
@ -166,7 +166,7 @@ module_description User CPU Usage (%)
|
|||
module_min_warning 70
|
||||
module_max_warning 90
|
||||
module_min_critical 91
|
||||
module_max_critical 100
|
||||
module_max_critical 0
|
||||
module_unit %
|
||||
module_end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772, GNU/Linux
|
||||
# Version 7.0NG.773.3, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# Copyright (c) 2003-2023 Pandora FMS
|
||||
# http://www.pandorafms.com
|
||||
|
||||
# General Parameters
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Pandora FMS Embedded Agent, startup script
|
||||
# Copyright (c) 2011 Artica ST, <info@artica.es>
|
||||
# Copyright (c) 2011-2023 Pandora FMS, <info@pandorafms.com>
|
||||
# Tested on Busybox 1.13
|
||||
# v4.0 Build 110122
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -46,5 +46,5 @@ License
|
|||
-------
|
||||
|
||||
The project is distributed under the GPL License v2 or later.
|
||||
Copyright (C) 2004-2011 Pandora FMS development team
|
||||
Copyright (C) 2004-2023 Pandora FMS development team
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Licensed under GPL license v2.
|
||||
Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||
Copyright (c) 2003-2023 Pandora FMS
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772, Solaris Version
|
||||
# Version 7.0NG.773.3, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# Copyright (c) 2003-2023 Pandora FMS
|
||||
# http://www.pandorafms.com
|
||||
|
||||
# General Parameters
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Base config file for Pandora FMS Windows Agent
|
||||
# (c) 2006-2021 Artica Soluciones Tecnologicas
|
||||
# Version 7.0NG.772
|
||||
# (c) 2006-2023 Pandora FMS
|
||||
# Version 7.0NG.773.3
|
||||
# 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
|
||||
|
@ -119,7 +119,7 @@ module_description CPU Load (%)
|
|||
module_min_warning 80
|
||||
module_max_warning 90
|
||||
module_min_critical 91
|
||||
module_max_critical 100
|
||||
module_max_critical 0
|
||||
module_end
|
||||
|
||||
# Number processes
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/perl
|
||||
# **********************************************************************
|
||||
# Pandora FMS Generic Unix/Perl Agent
|
||||
# (c) 2009-2011 Artica Soluciones Tecnológicas
|
||||
# (c) 2009-2023 Pandora FMS
|
||||
# with the help of many people. Please see http://pandorafms.org
|
||||
# This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
@ -2285,6 +2285,6 @@ This is released under the GNU Lesser General Public License.
|
|||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (c) 2005-2010 Artica Soluciones Tecnologicas S.L
|
||||
Copyright (c) 2005-2023 Pandora FMS
|
||||
|
||||
=cut
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# **********************************************************************
|
||||
# Pandora FMS Agent Daemon launcher for Unix (AIX, HP-UX, SunOS, Linux)
|
||||
# (c) 2008-2010 Artica ST
|
||||
# (c) 2008-2023 Pandora FMS
|
||||
# (c) 2008-2010 Sancho Lerena <slerena@gmail.com>
|
||||
#
|
||||
# Please see http://www.pandorafms.org
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
# pandora_exec - Execute a command with a time limit.
|
||||
#
|
||||
# Copyright (c) 2008-2023 Artica PFMS S.L.
|
||||
# Copyright (c) 2008-2023 Pandora FMS S.L.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# **********************************************************************
|
||||
# Pandora FMS Agent Installer for Unix (generic installer)
|
||||
# (c) 2008-2010 Artica ST
|
||||
# (c) 2008-2023 Pandora FMS
|
||||
# (c) 2008-2010 Sancho Lerena <slerena@gmail.com>
|
||||
#
|
||||
# This is a generic installer for all Unix-like systems.(AIX, HP-UX, SunOS, Linux, FreeBSD)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
###############################################################################
|
||||
#
|
||||
# Copyright (c) 2008 Ramon Novoa <rnovoa@artica.es>
|
||||
# Copyright (c) 2008 Artica Soluciones Tecnologicas S.L.
|
||||
# Copyright (c) 2008-2023 Pandora FMS.
|
||||
#
|
||||
# grep_log Perl script to search log files for a matching pattern. The last
|
||||
# searched position is saved in an index file so that consecutive
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/perl
|
||||
###############################################################################
|
||||
#
|
||||
# Copyright (c) 2009 Artica Soluciones Tecnologicas S.L.
|
||||
# Copyright (c) 2009-2023 Pandora FMS.
|
||||
#
|
||||
# inventory Generate a hardware/software inventory.
|
||||
#
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#
|
||||
# Usage: nagios_plugin_wrapper <module_name> <nagios plugin execution with its parameters>
|
||||
##########################################################################
|
||||
# Copyright (c) 2010 Artica Soluciones Tecnologicas S.L
|
||||
# Copyright (c) 2010-2023 Pandora FMS
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
###############################################################################
|
||||
#
|
||||
# Copyright (c) 2009 Ramon Novoa <rnovoa@artica.es>
|
||||
# Copyright (c) 2009 Artica Soluciones Tecnologicas S.L.
|
||||
# Copyright (c) 2009-2023 Pandora FMS.
|
||||
#
|
||||
# pandora_df Retrieve filesystem disk usage. By default information for all
|
||||
# filesystems is returned, but one or more filesystems may be
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl
|
||||
# Update binary tool
|
||||
# Copyright (c) 2010 Artica Soluciones Tecnologicas S.L.
|
||||
# Copyright (c) 2010-2023 Pandora FMS.
|
||||
# Copyright (c) Sancho Lerena <slerena@artica.es>
|
||||
|
||||
use strict;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Copyright (c) 2007-2008 Ramon Novoa <rnovoa@artica.es>
|
||||
# Copyright (c) 2007-2008 Artica Soluciones Tecnologicas S.L.
|
||||
# Copyright (c) 2007-2023 Pandora FMS.
|
||||
#
|
||||
# tentacle_client.pl Tentacle Client. See https://pandorafms.com/docs/ for
|
||||
# protocol description.
|
||||
|
@ -1095,7 +1095,7 @@ Protocol description and more info at: L<< https://pandorafms.com/docs/index.php
|
|||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (c) 2005-2010 Artica Soluciones Tecnologicas S.L
|
||||
Copyright (c) 2005-2023 Pandora FMS
|
||||
|
||||
=cut
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# Tentacle have IANA assigned port tpc/41121 as official port.
|
||||
##########################################################################
|
||||
# Copyright (c) 2007-2008 Ramon Novoa <rnovoa@artica.es>
|
||||
# Copyright (c) 2005-2022 Artica Soluciones Tecnologicas S.L
|
||||
# Copyright (c) 2005-2023 Pandora FMS
|
||||
#
|
||||
# tentacle_server.pl Tentacle Server. See https://pandorafms.com/docs/ for
|
||||
# protocol description.
|
||||
|
@ -1884,7 +1884,7 @@ Protocol description and more info at: L<< https://pandorafms.com/docs/index.php
|
|||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (c) 2005-2010 Artica Soluciones Tecnologicas S.L
|
||||
Copyright (c) 2005-2023 Pandora FMS
|
||||
|
||||
=cut
|
||||
|
||||
|
|
|
@ -54,5 +54,5 @@ License
|
|||
-------
|
||||
|
||||
The project is distributed under the GPL License v2 or later.
|
||||
Copyright (C) 2004-2010 Pandora FMS development team
|
||||
Copyright (C) 2004-2023 Pandora FMS development team
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/ksh
|
||||
# **********************************************************************
|
||||
# Pandora FMS AIX Agent
|
||||
# (c) 2009 Artica Soluciones Tecnológicas SL
|
||||
# (c) 2009-2023 Pandora FMS
|
||||
# with the help of many people. Please see http://pandorafms.org
|
||||
# This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.772, AIX version
|
||||
# Version 7.0NG.773.3, AIX version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/ksh
|
||||
|
||||
# Pandora FMS AIX Agent, startup script
|
||||
# Copyright (c) 2006-2009 Artica ST, <info@artica.es>
|
||||
# Copyright (c) 2006-2023 Pandora FMS, <info@pandorafms.com>
|
||||
# v1.3.1 Build 091104
|
||||
# http://www.pandorafms.com
|
||||
|
||||
|
|
|
@ -54,5 +54,5 @@ License
|
|||
-------
|
||||
|
||||
The project is distributed under the GPL License v2 or later.
|
||||
Copyright (C) 2004-2010 Pandora FMS development team
|
||||
Copyright (C) 2004-2023 Pandora FMS development team
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.772
|
||||
# Version 7.0NG.773.3
|
||||
# FreeBSD/IPSO version
|
||||
# Licenced under GPL licence, 2003-2007 Sancho Lerena
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# **********************************************************************
|
||||
# Pandora FMS Generic IPSO/HPUX
|
||||
# (c) 2009-2021 Artica Soluciones Tecnológicas SL
|
||||
# (c) 2009-2023 Pandora FMS
|
||||
# with the help of many people. Please see http://pandorafms.org
|
||||
# This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/csh
|
||||
|
||||
# Pandora FMS IPSO/BSD, startup script
|
||||
# Copyright (c) 2006-2009 Artica ST, <info@artica.es>
|
||||
# Copyright (c) 2006-2023 Pandora FMS, <info@pandorafms.com>
|
||||
# IPSO/BSD (csh)
|
||||
# v1.2 Build 091104
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -54,5 +54,5 @@ License
|
|||
-------
|
||||
|
||||
The project is distributed under the GPL License v2 or later.
|
||||
Copyright (C) 2004-2010 Pandora FMS development team
|
||||
Copyright (C) 2004-2023 Pandora FMS development team
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# **********************************************************************
|
||||
# Pandora FMS Generic HPUX Agent
|
||||
# (c) 2009 Artica Soluciones Tecnológicas SL
|
||||
# (c) 2009-2023 Pandora FMS
|
||||
# with the help of many people. Please see http://pandorafms.org
|
||||
# This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.772, HPUX Version
|
||||
# Version 7.0NG.773.3, HPUX Version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Pandora FMS HP-UX Agent, startup script
|
||||
# Copyright (c) 2006-2009 Artica ST, <info@artica.es>
|
||||
# Copyright (c) 2006-2023 Pandora FMS, <info@pandorafms.com>
|
||||
# v1.2 Build 091104
|
||||
# http://www.pandorafms.com
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ Architecture: all
|
|||
Priority: optional
|
||||
Section: admin
|
||||
Installed-Size: 260
|
||||
Maintainer: ÁRTICA ST <info@artica.es>
|
||||
Maintainer: Pandora FMS <info@pandorafms.com>
|
||||
Homepage: http://pandorafms.org/
|
||||
Depends: coreutils, perl
|
||||
Description: Pandora FMS agents are based on native languages in every platform: scripts that can be written in any language. It’s possible to reproduce any agent in any programming language and can be extended without difficulty the existing ones in order to cover aspects not taken into account up to the moment. These scripts are formed by modules that each one gathers a "chunk" of information. Thus, every agent gathers several "chunks" of information; this one is organized in a data set and stored in a single file, called data file.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#Pandora FMS- http:#pandorafms.com
|
||||
# ==================================================
|
||||
# Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
# Copyright (c) 2005-2023 Pandora FMS
|
||||
# Please see http:#pandorafms.org for full contribution list
|
||||
|
||||
# This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -54,5 +54,5 @@ License
|
|||
-------
|
||||
|
||||
The project is distributed under the GPL License v2 or later.
|
||||
Copyright (C) 2004-2010 Pandora FMS development team
|
||||
Copyright (C) 2004-2023 Pandora FMS development team
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
# **********************************************************************
|
||||
# Pandora FMS Generic Linux Agent
|
||||
# (c) 2010 Artica Soluciones Tecnológicas
|
||||
# (c) 2010-2023 Pandora FMS
|
||||
# with the help of many people. Please see http://pandorafms.org
|
||||
# This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
@ -172,7 +172,7 @@ function configure_agent {
|
|||
if [ "$CRON_MODE" == "0" ]
|
||||
then
|
||||
# Script banner at start
|
||||
echo "Pandora FMS Agent $AGENT_VERSION (c) Artica ST 2003-2010"
|
||||
echo "Pandora FMS Agent $AGENT_VERSION (c) Pandora FMS 2003-2023"
|
||||
echo "This program is licensed under GPL2 Terms. http://pandorafms.org"
|
||||
echo "Running in $NOMBRE_HOST at $TIMESTAMP"
|
||||
echo " "
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772
|
||||
# Version 7.0NG.773.3
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# (c) 2003-2023 Pandora FMS
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
||||
# General Parameters
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Pandora FMS Linux Agent, startup script
|
||||
# Copyright (c) 2006-2010 Artica ST, <info@artica.es>
|
||||
# Copyright (c) 2006-2023 Pandora FMS, <info@pandorafms.com>
|
||||
# Linux Version (generic), for SuSe and Debian/Ubuntu.
|
||||
# other Linux distros could not work properly without modifications
|
||||
# v3.0.1 Build 091104
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Pandora FMS Agent Installer (c) 2008-2010 Artica ST
|
||||
# Pandora FMS Agent Installer (c) 2008-2023 Pandora FMS
|
||||
# Linux Version (generic), for SuSe and Debian/Ubuntu only
|
||||
# other Linux distros could not work properly without modifications
|
||||
# Please see http://www.pandorafms.org
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
###############################################################################
|
||||
#
|
||||
# Copyright (c) 2008 Ramon Novoa <rnovoa@artica.es>
|
||||
# Copyright (c) 2008 Artica Soluciones Tecnologicas S.L.
|
||||
# Copyright (c) 2008-2023 Pandora FMS.
|
||||
#
|
||||
# grep_log Perl script to search log files for a matching pattern. The last
|
||||
# searched position is saved in an index file so that consecutive
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/perl
|
||||
###############################################################################
|
||||
#
|
||||
# Copyright (c) 2009 Artica Soluciones Tecnologicas S.L.
|
||||
# Copyright (c) 2009-2023 Pandora FMS.
|
||||
#
|
||||
# inventory Generate a hardware/software inventory.
|
||||
#
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue