2008-03-11 Ramon Novoa <rnovoa@artica.es>

* linux/pandora_agent: Added support for Tentacle file transfers.
	* linux/pandora_agent.conf: Added Tentacle specific options.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@743 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
ramonn 2008-03-11 15:27:21 +00:00
parent 97be85b405
commit 07a5b5ef19
3 changed files with 48 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-03-11 Ramon Novoa <rnovoa@artica.es>
* linux/pandora_agent: Added support for Tentacle file transfers.
* linux/pandora_agent.conf: Added Tentacle specific options.
2008-03-11 Manuel Arostegui <marostegui@artica.es>
* linux/pandora_agent_daemon: Added pidof checking to

View File

@ -130,6 +130,34 @@ do
PANDORA_NICE=`echo $a | awk '{ print $2 }' `
echo "$TIMESTAMP - [SETUP] - PandoraFMS Nice is $PANDORA_NICE" >> $PANDORA_LOGFILE
fi
# Tentacle options
if [ ! -z "`echo $a | grep -e '^server_pwd'`" ]
then
SERVER_PWD=`echo $a | awk '{ print $2 }' `
if [ ! -z "$SERVER_PWD" ]
then
TENTACLE_OPTS="-x $SERVER_PWD $TENTACLE_OPTS"
echo "$TIMESTAMP - [SETUP] - Tentacle server password set" >> $PANDORA_LOGFILE
fi
fi
if [ ! -z "`echo $a | grep -e '^server_ssl'`" ]
then
SERVER_SSL=`echo $a | awk '{ print $2 }' `
if [ "$SERVER_SSL" == "yes" ]
then
TENTACLE_OPTS="-c $TENTACLE_OPTS"
echo "$TIMESTAMP - [SETUP] - OpenSSL enabled for Tentacle" >> $PANDORA_LOGFILE
fi
fi
if [ ! -z "`echo $a | grep -e '^server_opts'`" ]
then
SERVER_OPTS=`echo $a | awk -F'"' '{ print $2 }' `
if [ ! -z "$SERVER_OPTS" ]
then
TENTACLE_OPTS="$SERVER_OPTS $TENTACLE_OPTS"
echo "$TIMESTAMP - [SETUP] - Extra options for the Tentacle client $SERVER_OPTS" >> $PANDORA_LOGFILE
fi
fi
done
@ -350,6 +378,11 @@ do
fi
# Send packets to server and delete it
if [ "$TRANSFER_MODE" == "tentacle" ]
then
eval tentacle_client -v -a $SERVER_IP -p $SERVER_PORT $TENTACLE_OPTS $PANDORA_FILES > /dev/null 2> $PANDORA_LOGFILE.err
fi
if [ "$TRANSFER_MODE" == "ssh" ]
then
scp -P $SERVER_PORT $PANDORA_FILES pandora@$SERVER_IP:$SERVER_PATH > /dev/null 2> $PANDORA_LOGFILE.err

View File

@ -31,9 +31,18 @@ checksum 0
# By default is 22 (for ssh)
#server_port 22
# ftp, ssh or local
# tentacle, ftp, ssh or local
transfer_mode ssh
# Tentacle server password. Leave empty for no password (default).
#server_pwd
# Set to yes/no to enable/disable OpenSSL support for Tentacle (disabled by default).
#server_ssl no
# Extra options for the Tentacle client (for example, server_opts "-v -r 5").
# server_opts
# delayed_startup defines number of MINUTES before start execution
# for first time when startup Pandora Agent