pandorafms/extras/tentacle_proxy
slerena 2d704c35c1 2009-11-11 Sancho Lerena <slerena@artica.es>
* tentacle_proxy: Upgrade to support a previous check of connectiviy
        before trying to copy nothing to up server.

        * generic_daemon_launcher: A generic script used to launch other 
        apps/scripts as daemons. Could be used with tentacle_proxy, daemon_watchdog
        a secondary pandora_agent or pandora_server instance, for example.

        * daemon_watchdog: A script used to watchdog for another process, for
        example a pandora_server or a mysql. This also try to "restart" the process
        if it's down and has a custom execution field to notify directly admin
        when a daemon is not restarting and it's down.

        * build_rpm_packages.sh: Some fixes in RPM build script.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2105 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-11-11 18:06:58 +00:00

35 lines
668 B
Bash
Executable File

#!/bin/bash
# (c) 2008-2009 PandoraFMS.org Development Team
# This script is BSD Licensed.
# This script is used to copy all received data in /var/spool/pandora/data_in
# (default Pandora FMS incoming directory) to a remote Tentacle server.
# Define here your Parameters
TIMEOUT=5
SERVER_IP=192.168.50.1
# Main code, do not alter
while [ 1 ]
do
# Check before if I can connect to remote IP
CAN_CONNECT=`ping -c 1 -q $SERVER_IP | grep " 0%" | wc -l`
if [ "$CAN_CONNECT" == 1 ]
then
for myfile in `find /var/spool/pandora/data_in -type f`
do
tentacle_client -q -a $SERVER_IP $myfile
rm -Rf $myfile
done
fi
sleep $TIMEOUT
done