FTP check with Groovy script
I am trying to use groovy to verify the connectivity of an FTP server following the FAQ (http://help.logicmonitor.com/using/da...)
Here is the exact script used:
import com.santaba.agent.groovyapi.expect.Expect
cli = Expect.open(\'\'x.x.x.x\'\', 21, 5)
cli.expect(\'\'220 \'\')
cli.send( \'\'user anonymous
\'\' )
cli.expect(\'\'331 \'\')
cli.send(\'\'pass meme
\'\')
cli.expect( \'\'230 \'\')
cli.send( \'\'quit
\'\' )
Unfortunately, the groovy debugger wither comes back with a timeout, or the following:
>> !groovy
End of stream reached, no match found
My FTP server, in turn, see the connection coming from the agent, but never receives the \'\'USER anonymous\'\' command.
Any Help welcome
Jean-Michel_Tou
Posted 14 years ago·Last reply 11 years ago
3 comments
Jerry_Wiltse
·11 years agoWas this ever resolved?
I will use WILDVALUE for now, but is there a better way?
Jean-Michel_Tou
OP14 years agoI have tried 220 , and 220 exact_sentence_returned_by_FTP.n
nNot any better.