Netsight Script Error Wrong # args


Userlevel 4
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.

1 reply

Hi Joshua,

Looks like you have empty lines in the script which is causing the error.

If you delete the empty lines by backspacing, you will not see this error.
Userlevel 4
Tuns out you need to prepend CLI for set commands. The following works:
CLI set sntp server xxx.xxx.xxx.xxx.

Reply