7 Replies Latest reply: Mar 25, 2011 11:18 AM by DavidRickard RSS

How do i add a valid response for "Device.CLI.Send"

I'm using Device.CLI.Send commands to build a F5 UCS archive and SFTP it off the F5 box. I finally got everything working but I'm getting errors "Did not receive expected response" for when the prompt changes during the SFTP session.  The Device.CLI.Send commands help file states:  4. Enter the specified commands in  sequence and wait for a valid response

So I'm looking for how to update the list of valid responses so my SFTP session does not give me false errors.  Thanks!

Device Type = Linux.RedHat.Bash

rm -f /*.ucs
bigpipe config save /%ctDeviceName-backup_`date +%m_%d_%y`.ucs
sftp username@ip-address
******** <- pass removed
put /*.ucs

I originally tried Device Type = F5.BigIP but my output file wasn't recording the full session and it was reporting errors but not showing me what lines were giving me errors.  Linux.RedHat.Bash is giving me better results.

  • Re: How do i add a valid response for "Device.CLI.Send"

    Hi Mgramlic - Handling of prompt changes is normally something we need to do specifically within the device script.  It is not a customizable property.

    I'm sorry to say, but at present we don’t support the F5 UCS (see:  Backing up F5 BIGIP UCS archive). We'll need to write a new script for you, and we're already tracking it as a feature request. I'll add another vote - typically we roll a bunch of new scripts out with every release. 


  • Re: How do i add a valid response for "Device.CLI.Send"

    Hi all,

    i've been able to do it, share it :

    create a sript in /home/<username>/ftpput.sh
    for exemple

    ftp -n <Ftp server  IP> << END_FTP
    quote USER $1
    quote PASS $2
    cd /<whateverUwant>
    put $3 $4

    Do not forget de get the script executable
    # chmod u+x /home/<username>/ftpput.sh

    And here we are, in the device.CLI.Send activity options for some Linux.RedHat.Bash devices:

    bigpipe config save %ctDeviceName
    /home/<username>/ftpput.sh <user> <passwd> /var/local/ucs/%ctDeviceName.ucs %ctDeviceName

    hope it 'll help, that worked for me.

    thx to mgramlic for device type Linux.RedHat.Bash

    • Re: How do i add a valid response for "Device.CLI.Send"

      Cédric - thanks for posting.


    • Re: How do i add a valid response for "Device.CLI.Send"

      Cédric, thank you so much for the script!! It's working perfectly for me too.

    • Re: How do i add a valid response for "Device.CLI.Send"

      Cedric,  I am trying to do the same but my activity is stopping with "did not receive expected response" to the "b save config" command.  After debugging I think it is the saving active configuration..." that is upsetting cattools, but you don't seem to have had the same problem.  Is there anything else you have done which you haven't mentioned?

      • Re: How do i add a valid response for "Device.CLI.Send"

        It's still running for me 1 year after, now using devices BIG-IP 10.0.0 Build 5460.0 Hotfix HF1                                                                                          

        Let me show you what i put on the cattools activity options tab:

        bigpipe config save %ctDeviceName
        ll /var/local/ucs
        /home/admin/ftpput.sh anonymous anonymous /var/local/ucs/%ctDeviceName.ucs %ctDeviceName.ucs

        No "b save config" here.
        You can log output with the "save device output" option.

        Hope it will help.