Netsight Script Error Wrong # args

  • 1
  • 1
  • Problem
  • Updated 11 months ago
  • Solved
  • (Edited)
Hello,

We are trying to use a very simple script to update our NTP settings.  Running the following script produces the error below.  We have another basic scripts for snmp settings that we've used in the past with success, but now produces the same error.  We are running Netsight 7.0.9.4.  Any suggestions would be appreciated.  Thanks much.

#@MetaDataStart
#############################################################################################
# Define your user parameters in this section. For reference, see bundled scripts.
#############################################################################################
#@MetaDataEnd
# Enter all CLI commands from here
set sntp server xxx.xxx.xxx.xxx
clear sntp server xxx.xxx.xxx.xxx
save config


*** Error at line - 13 ***
wrong # args: should be "set varName ?newValue?"


Note there are only 9 lines in the script....


Update:  I've narrowed down the issue to the "set" command.  The script seems to expect a variable name and not a cli command.   note that we are trying to run this again B-Series Switches.  Also opened a ticket with GTAC for more info.
Photo of Joshua Puusep

Joshua Puusep

  • 2,254 Points 2k badge 2x thumb

Posted 11 months ago

  • 1
  • 1
Photo of Joshua Puusep

Joshua Puusep

  • 2,254 Points 2k badge 2x thumb
Tuns out you need to prepend CLI for set commands. The following works:
CLI set sntp server xxx.xxx.xxx.xxx.