Pages: [1]   Go Down
Author Topic: [Solved] Remote SSH with expect script problem  (Read 427 times)
0 Members and 2 Guests are viewing this topic.
erinai
Newbie
*

Karma: 0
Offline Offline

Posts: 4


View Profile
« on: October 27, 2010, 01:36:23 PM »

Hello all,

I have a problem with a expect script. This script connects to another machine with remote ssh and runs sql queries.
It´s works fine out of pandora but when I add the code to the pandora_agent.conf the others monitors do not respond.
This the code:
module_begin
module_name prueba_sql
module_type generic_data
module_exec /etc/pandora/sqlgeneral.exp user@host bd sql promt && echo 1
module_description prueba 1
module_end

Thanks in advance!
« Last Edit: December 14, 2010, 12:58:25 PM by darode » Logged

chejov suzdal voshkov
Sr. Member
****

Karma: 8
Offline Offline

Posts: 175



View Profile WWW
« Reply #1 on: October 27, 2010, 02:56:08 PM »

it's possible to fail because there was a time out or for the && in the exec line, try to fit the line between " or '
Logged


erinai
Newbie
*

Karma: 0
Offline Offline

Posts: 4


View Profile
« Reply #2 on: December 14, 2010, 10:28:30 AM »

The problem is solved!
The script ,now, returns a number, so I don't need this "&& echo 1"

Thanks!
Logged

Pages: [1]   Go Up
Print
 
Jump to:  


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