Pages: [1]   Go Down
Author Topic: added functionnality: choice of scp port  (Read 273 times)
0 Members and 1 Guest are viewing this topic.
daggett
Sr. Member
****

Karma: 0
Offline Offline

Posts: 109


View Profile
« on: December 05, 2006, 04:30:40 PM »

Hi all,
I added a useful (for me at least) functionnality to the agent configuration:
the configuration of the scp port in pandora_agent.sh
at the beginning of the file:
        if [ ! -z "`echo $a | grep -e '^server_port'`" ]
        then
                SERVER_PORT=`echo $a | awk '{ print $2 }' `
                echo "$TIMESTAMP - [SETUP] - Server IP Address is $SERVER_PORT" >> $PANDORA_HOME/pandora.log
        fi
at the end:
scp -P $SERVER_PORT $PANDORA_FILES pandora@$SERVER_IP:$SERVER_PATH > /dev/null 2> /dev/null

And in the pandora_agent.conf file:
server_ip       MyDNSServerName
server_port   22
server_path     /opt/pandora/pandora_server/data_in

I needed this functionnality, so I added it!
by
Denis
« Last Edit: January 01, 1970, 01:00:00 AM by daggett » Logged

raul
Administrator
Expert member
*****

Karma: 1
Offline Offline

Posts: 576



View Profile
« Reply #1 on: December 05, 2006, 05:06:07 PM »

Thank you for your contrib! :wink:

We'll take a look at your code, but will not be in the Pandora 1.2... WE HAVE JUST RELEASED IT!!!!!!!
http://pandora.sourceforge.net/en/index.php?sec=downloads

Raul
« Last Edit: January 01, 1970, 01:00:00 AM by raul » Logged

Sancho Lerena
Administrator
Expert member
*****

Karma: 24
Offline Offline

Posts: 1151


I can see everything... with my glasses :-)


View Profile WWW
« Reply #2 on: December 05, 2006, 06:00:45 PM »

Quote from: "daggett"
Hi all,
I added a useful (for me at least) functionnality to the agent configuration:
the configuration of the scp port in pandora_agent.sh
at the beginning of the file:
        if [ ! -z "`echo $a | grep -e '^server_port'`" ]
        then
                SERVER_PORT=`echo $a | awk '{ print $2 }' `
                echo "$TIMESTAMP - [SETUP] - Server IP Address is $SERVER_PORT" >> $PANDORA_HOME/pandora.log
        fi
at the end:
scp -P $SERVER_PORT $PANDORA_FILES pandora@$SERVER_IP:$SERVER_PATH > /dev/null 2> /dev/null

And in the pandora_agent.conf file:
server_ip       MyDNSServerName
server_port   22
server_path     /opt/pandora/pandora_server/data_in

I needed this functionnality, so I added it!
by
Denis


Thanks!, it has been added to code repository and will be published  for 1.3 version.
« Last Edit: January 01, 1970, 01:00:00 AM by nil » Logged

-- See you in the other screen.

Manuel Arostegui
Global Moderator
Expert member
*****

Karma: 50
Offline Offline

Posts: 853



View Profile
« Reply #3 on: December 06, 2006, 02:50:41 PM »

Well done Dagget!
Maybe we could also add debug option (I mean, -v -v -v) to the scp
« Last Edit: January 01, 1970, 01:00:00 AM by manu » Logged

Pages: [1]   Go Up
Print
 
Jump to:  


SourceForge.net Logo  This site is monitored by Pandora FMS   ArticaST